From 79e55126d3eb0fc59f66ed29ff1f49b3d2a5fb6c Mon Sep 17 00:00:00 2001 From: donghongyu Date: Fri, 1 Nov 2024 12:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=8CCountly=E3=80=8D=201=E3=80=81=E8=B0=83?= =?UTF-8?q?=E9=80=9A=E5=85=AC=E5=8F=B8=E6=9C=8D=E5=8A=A1=E5=99=A8=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E7=9A=84=E8=8A=82=E7=82=B9=EF=BC=9B=202=E3=80=81?= =?UTF-8?q?=E8=B0=83=E9=80=9A=E4=B8=8A=E4=BC=A0maven?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/cloud/MoGoApplication.java | 4 +- build.gradle | 10 ++++ gradle.properties | 41 ++++++++++++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/ly/count/android/benchmark/App.java | 4 +- .../java/ly/count/android/demo/kotlin/App.kt | 4 +- libraries/countly/app-native/build.gradle | 48 ++++++++++++++----- .../java/ly/count/android/demo/crash/App.java | 4 +- .../main/java/ly/count/android/demo/App.java | 4 +- libraries/countly/upload-plugin/build.gradle | 46 +++++++++++------- settings.gradle | 8 ++-- 11 files changed, 129 insertions(+), 46 deletions(-) diff --git a/app/src/main/java/com/mogo/cloud/MoGoApplication.java b/app/src/main/java/com/mogo/cloud/MoGoApplication.java index 0fd3b4d..01ddd01 100644 --- a/app/src/main/java/com/mogo/cloud/MoGoApplication.java +++ b/app/src/main/java/com/mogo/cloud/MoGoApplication.java @@ -25,8 +25,8 @@ public class MoGoApplication extends MultiDexApplication { private static final String TAG = "MoGoApplication"; - private String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240"; - private String COUNTLY_SERVER_URL = "http://172.30.10.190"; + private String COUNTLY_APP_KEY = "45cccb4a005ca14b79fca7d24b69e1a67730e325"; + private String COUNTLY_SERVER_URL = "http://countly.zhidaozhixing.com"; @Override public void onCreate() { diff --git a/build.gradle b/build.gradle index a1b9707..994ec12 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,9 @@ buildscript { maven { url 'http://nexus.zhidaoauto.com/repository/maven-public/' } + maven { + url 'http://nexus.zhidaoauto.com/repository/maven-central/' + } google() gradlePluginPortal() } @@ -26,6 +29,10 @@ buildscript { classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.10.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files +// classpath 'ly.count.android:sdk-plugin:24.4.1' + classpath group: 'com.mogo.cloud', 'name': 'sdk-plugin', 'version': '1.4.7.42' + + } } @@ -41,6 +48,9 @@ allprojects { maven { url 'http://nexus.zhidaoauto.com/repository/maven-public/' } + maven { + url 'http://nexus.zhidaoauto.com/repository/maven-central/' + } google() gradlePluginPortal() } diff --git a/gradle.properties b/gradle.properties index be3f94d..471a78f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -59,3 +59,44 @@ MOGO_TELEMATIC_VERSION=1.4.7.42 MOGO_V2X_VERSION=1.4.7.42 # SKIN MOGO_SKIN_VERSION=1.4.7.49.18-debug + + + +###################################################################### +# for vanniktech +###################################################################### +# 服务器地址 +SONATYPE_HOST=S01 +# 发布 release 组件时是否签名 +RELEASE_SIGNING_ENABLED=false +# 组织名 +GROUP=com.mogo.cloud +VERSION_NAME=1.4.7.42 +# 主页 +POM_URL=https://gitlab.zhidaoauto.com/SCA/L4HA/AndroidApp/support/countly-sdk-android +# 版本控制信息 +POM_SCM_URL=https://github.com/pengxurui/ModularEventBus/ +POM_SCM_CONNECTION=https://gitlab.zhidaoauto.com/SCA/L4HA/AndroidApp/support/countly-sdk-android +POM_SCM_DEV_CONNECTION=scm:git:ssh://git@github.com/pengxurui/ModularEventBus.git +# Licenses 信息 +POM_LICENSE_NAME=The Apache Software License, Version 2.0 +POM_LICENSE_URL=https://www.apache.org/licenses/LICENSE-2.0.txt +POM_LICENSE_DIST=repo +# 开发者信息 +POM_DEVELOPER_ID=MoGo +POM_DEVELOPER_NAME=MoGo +POM_DEVELOPER_URL=https://mogo.com/ +#SIGNING SECTION +#mavenCentralUsername=[填 Sonatype 账号名] +#mavenCentralPassword=[填 Sonatype 密码] +#signing.keyId=[密钥指纹,取后 8 位即可] +#signing.password=[passphrase 密钥口令] +#signing.secretKeyRingFile=[导出的私钥文件路径,如 /Users/pengxurui/xxx.gpg] +#signing.keyId=xxx +#signing.password=xxx +#signing.secretKeyRingFile=xxx +mavenCentralUsername=xintai +mavenCentralPassword=xintai2018 + +ZhiDaoAutoUsername=xintai +ZhiDaoAutoPassword=xintai2018 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fe371e9..641ad77 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://mirrors.tencent.com/gradle/gradle-6.7.1-all.zip diff --git a/libraries/countly/app-benchmark/src/main/java/ly/count/android/benchmark/App.java b/libraries/countly/app-benchmark/src/main/java/ly/count/android/benchmark/App.java index 8070d9a..9205171 100644 --- a/libraries/countly/app-benchmark/src/main/java/ly/count/android/benchmark/App.java +++ b/libraries/countly/app-benchmark/src/main/java/ly/count/android/benchmark/App.java @@ -9,8 +9,8 @@ import ly.count.android.sdk.ModuleLog; import ly.count.android.sdk.PerformanceCounterCollector; public class App extends Application { - private final static String COUNTLY_SERVER_URL = "http://172.30.10.190"; - private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240"; + private final static String COUNTLY_SERVER_URL = "http://countly.zhidaozhixing.com"; + private final static String COUNTLY_APP_KEY = "45cccb4a005ca14b79fca7d24b69e1a67730e325"; private final static String DEVICE_ID = "YOUR_DEVICE_ID"; public static PerformanceCounterCollector appPcc; diff --git a/libraries/countly/app-kotlin/src/main/java/ly/count/android/demo/kotlin/App.kt b/libraries/countly/app-kotlin/src/main/java/ly/count/android/demo/kotlin/App.kt index 1889c55..5a3521f 100644 --- a/libraries/countly/app-kotlin/src/main/java/ly/count/android/demo/kotlin/App.kt +++ b/libraries/countly/app-kotlin/src/main/java/ly/count/android/demo/kotlin/App.kt @@ -9,8 +9,8 @@ import ly.count.android.sdk.CountlyConfig * Main Application class */ class App : Application() { - private val COUNTLY_SERVER_URL = "http://172.30.10.190" - private val COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240" + private val COUNTLY_SERVER_URL = "http://countly.zhidaozhixing.com" + private val COUNTLY_APP_KEY = "45cccb4a005ca14b79fca7d24b69e1a67730e325" override fun onCreate() { super.onCreate() diff --git a/libraries/countly/app-native/build.gradle b/libraries/countly/app-native/build.gradle index e141026..463bbe2 100644 --- a/libraries/countly/app-native/build.gradle +++ b/libraries/countly/app-native/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.application' +apply plugin: ly.count.android.plugins.UploadSymbolsPlugin android { compileSdkVersion rootProject.ext.android.compileSdkVersion @@ -11,7 +12,6 @@ android { versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } buildTypes { @@ -34,11 +34,6 @@ android { } } -repositories { - // needed for using sdk-native from countly maven repo - mavenCentral() -} - // sdk and sdk-native are pulled from submodules of the project. // If you are running app independently, you may pull their latest version from our maven repo using the commented lines. dependencies { @@ -51,12 +46,39 @@ dependencies { //implementation 'ly.count.android:sdk-native:21.11.0' } -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.14.1' - } + +countly { + // required by both tasks + server "http://countly.zhidaozhixing.com" + // same app_key used for SDK integration + app_key "45cccb4a005ca14b79fca7d24b69e1a67730e325" + + // location of mapping.txt file relative to project build directory + mappingFile "outputs/mapping/release/mapping.txt" + + // note that will be saved with the upload and can be checked in the UI + noteJava "sdk-plugin automatic upload of mapping.txt" + + // optional properties for uploadNativeSymbols. Shown are the default values. + + // directory of .so files relative to project build directory. + // you can check the tar.gz file created under intermediates/countly + // BUILD_TYPE could be debug or release + nativeObjectFilesDir "intermediates/merged_native_libs/BUILD_TYPE" + + // path for breakpad tool dump_syms executable + dumpSymsPath "/usr/bin" + + // note that will be saved with the upload and can be checked in the UI + noteNative "sdk-plugin automatic upload of breakpad symbols" } +//tasks.whenTaskAdded { task -> +// if (task.name.startsWith('assemble')) { +// //this would upload your Java mapping file +// task.dependsOn('uploadJaveSymbols') +// +// //this would upload your native (c++) symbols +// task.dependsOn('uploadNativeSymbols') +// } +//} \ No newline at end of file diff --git a/libraries/countly/app-native/src/main/java/ly/count/android/demo/crash/App.java b/libraries/countly/app-native/src/main/java/ly/count/android/demo/crash/App.java index 7c2d190..e64a78a 100644 --- a/libraries/countly/app-native/src/main/java/ly/count/android/demo/crash/App.java +++ b/libraries/countly/app-native/src/main/java/ly/count/android/demo/crash/App.java @@ -9,8 +9,8 @@ import ly.count.android.sdknative.CountlyNative; public class App extends Application { - private final static String COUNTLY_SERVER_URL = "http://172.30.10.190"; - private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240"; + private final static String COUNTLY_SERVER_URL = "http://countly.zhidaozhixing.com"; + private final static String COUNTLY_APP_KEY = "45cccb4a005ca14b79fca7d24b69e1a67730e325"; private final static String DEFAULT_URL = "https://your.server.ly"; private final static String DEFAULT_APP_KEY = "YOUR_APP_KEY"; diff --git a/libraries/countly/app/src/main/java/ly/count/android/demo/App.java b/libraries/countly/app/src/main/java/ly/count/android/demo/App.java index 57ec8ea..39e5437 100644 --- a/libraries/countly/app/src/main/java/ly/count/android/demo/App.java +++ b/libraries/countly/app/src/main/java/ly/count/android/demo/App.java @@ -30,8 +30,8 @@ import static ly.count.android.sdk.messaging.CountlyPush.COUNTLY_BROADCAST_PERMI public class App extends Application { /** You should use try.count.ly instead of YOUR_SERVER for the line below if you are using Countly trial service */ - private final static String COUNTLY_SERVER_URL = "http://172.30.10.190"; - private final static String COUNTLY_APP_KEY = "5efc02a15444c88cbf8056ec66ab291ea3cd3240"; + private final static String COUNTLY_SERVER_URL = "http://countly.zhidaozhixing.com"; + private final static String COUNTLY_APP_KEY = "45cccb4a005ca14b79fca7d24b69e1a67730e325"; private final static String DEFAULT_URL = "https://your.server.ly"; private final static String DEFAULT_APP_KEY = "YOUR_APP_KEY"; diff --git a/libraries/countly/upload-plugin/build.gradle b/libraries/countly/upload-plugin/build.gradle index ae72ea4..1e37cf9 100644 --- a/libraries/countly/upload-plugin/build.gradle +++ b/libraries/countly/upload-plugin/build.gradle @@ -1,34 +1,44 @@ buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.vanniktech:gradle-maven-publish-plugin:0.21.0' //for publishing - } + repositories { + mavenCentral() + } + dependencies { + classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' //for publishing + } } plugins { - id 'java-gradle-plugin' - id 'groovy' + id 'java-gradle-plugin' + id 'groovy' } gradlePlugin { - plugins { - uploadSymbolPlugin { - id = 'ly.count.android.plugins.upload-symbols' - implementationClass = 'ly.count.android.plugins.UploadSymbolsPlugin' + plugins { + uploadSymbolPlugin { + id = 'ly.count.android.plugins.upload-symbols' + implementationClass = 'ly.count.android.plugins.UploadSymbolsPlugin' + } } - } } repositories { - mavenCentral() + mavenCentral() } dependencies { - implementation gradleApi() - implementation localGroovy() - implementation 'com.squareup.okhttp3:okhttp:3.14.9' + implementation gradleApi() + implementation localGroovy() + implementation 'com.squareup.okhttp3:okhttp:3.14.9' } -apply plugin: "com.vanniktech.maven.publish" \ No newline at end of file +apply plugin: "com.vanniktech.maven.publish" + +publishing { + repositories { + maven { + name = "ZhiDaoAuto" + url = "https://nexus.zhidaoauto.com/repository/maven-releases/" + credentials(PasswordCredentials.class) + } + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 656a3d6..8d8283e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,6 +3,7 @@ include ':foudations:mogo-live' include ':foudations:mogo-socket' include ':foudations:mogo-network' include ':foudations:mogo-passport' +include ':foudations:mogo-v2x' include ':modules:mogo-trafficlive' include ':modules:mogo-realtime' @@ -11,11 +12,9 @@ include ':modules:mogo-tanlu' include ':libraries:mogo-telematic' include ':libraries:mogo-skin' - - include ':app' + rootProject.name = "MoGoAiCloudSdk" -include ':foudations:mogo-v2x' // 基于开源的崩溃统计平台 countly 做的定制化开发,因为gradle、kotlin的版本限制无法在其原始项目开发,所以放在这个项目维护;方便统一依赖信息; @@ -24,4 +23,5 @@ include ':libraries:countly:sdk-native' include ':libraries:countly:app' include ':libraries:countly:app-benchmark' include ':libraries:countly:app-kotlin' -include ':libraries:countly:app-native' \ No newline at end of file +include ':libraries:countly:app-native' +include ':libraries:countly:upload-plugin' \ No newline at end of file