解决,冲突

This commit is contained in:
董宏宇
2021-01-25 17:14:35 +08:00
parent 520d36a412
commit 5f2f2653b6
13 changed files with 90 additions and 33 deletions

View File

@@ -36,14 +36,16 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
implementation rootProject.ext.dependencies.androidxconstraintlayout
// implementation project(path: ':foudations:mogo-passport')
implementation 'com.mogo.cloud:passport:1.0.2-SNAPSHOT'
// implementation project(path: ':foudations:mogo-commons')
implementation 'com.mogo.cloud:commons:1.0.2-SNAPSHOT'
// implementation project(path: ':modules:mogo-tanlu')
implementation 'com.mogo.cloud:tanlu:1.0.1-SNAPSHOT'
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
implementation "com.mogo.cloud:socket:${MOGO_SOCKET_VERSION}"
implementation "com.mogo.cloud:tanlu:${MOGO_TANLU_VERSION}"
} else {
implementation project(":foudations:mogo-socket")
implementation project(":foudations:mogo-commons")
implementation project(path: ':modules:mogo-tanlu')
}
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid

View File

@@ -43,7 +43,7 @@ public class MoGoApplication extends MultiDexApplication {
}
});
MoGoAiCloudClient.getInstance().init(this, clientConfig);
MoGoAiCloudClient.getInstance().init(this, clientConfig, null);
}
}

View File

@@ -59,7 +59,10 @@ dependencies {
implementation rootProject.ext.dependencies.retrofitconvertergson
implementation rootProject.ext.dependencies.retrofitconverterscalars
// api project(path: ':foudations:mogo-passport')
api 'com.mogo.cloud:passport:1.0.2-SNAPSHOT'
if (Boolean.valueOf(RELEASE)) {
api "com.mogo.cloud:passport:${MOGO_PASSPORT_VERSION}"
} else {
api project(path: ':foudations:mogo-passport')
}
}

View File

@@ -1,4 +1,4 @@
GROUP=com.mogo.cloud
POM_ARTIFACT_ID=httpdns
VERSION_CODE=1
VERSION_NAME=1.0.0
VERSION_NAME=1.0.0-SNAPSHOT

View File

@@ -31,11 +31,14 @@ dependencies {
implementation rootProject.ext.dependencies.androidxappcompat
api rootProject.ext.dependencies.mogoutils
// passport
implementation 'com.zhidao.thirdlogin:third-login:1.0.1'
implementation 'com.zhidao.account:accountsdk:1.0.16.1'
implementation 'com.zhidao.thirdlogin:third-login:1.0.2'
if (Boolean.valueOf(RELEASE)) {
api "com.mogo.cloud:httpdns:${MOGO_HTTPDNS_VERSION}"
} else {
api project(path: ':foudations:mogo-httpdns')
}
// api project(path: ':foudations:mogo-httpdns')
api 'com.mogo.cloud:httpdns:1.0.0'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -47,14 +47,16 @@ public class MoGoAiCloudClient {
*
* @param context 上下文
* @param aiCloudClientConfig SDK配置信息
* @param tokenCallback 获取令牌回调,使用端可根据回调的方法判断是否获取令牌成功,可为空
*/
public MoGoAiCloudClient init(Context context,
MoGoAiCloudClientConfig aiCloudClientConfig
MoGoAiCloudClientConfig aiCloudClientConfig,
final IMoGoTokenCallback tokenCallback
) {
mContext = context;
mAiCloudClientConfig = aiCloudClientConfig;
// 刷新令牌
refreshToken(null);
refreshToken(tokenCallback);
return sInstance;
}

View File

@@ -27,12 +27,16 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// 长链
api 'com.zhidao.socket:built-in-socket:1.0.17'
api 'com.zhidao.socket:built-in-socket:1.0.21'
// 上报位置
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.7'
implementation 'com.zhidao.locupload:loc-upload-sdk:1.1.8'
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:passport:${MOGO_PASSPORT_VERSION}"
} else {
implementation project(path: ':foudations:mogo-passport')
}
// implementation project(path: ':foudations:mogo-passport')
implementation 'com.mogo.cloud:passport:1.0.2-SNAPSHOT'
}

View File

@@ -22,9 +22,12 @@ RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/
SNAPSHOT_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-snapshots/
USERNAME=xintai
PASSWORD=xintai2018
# 编译模式: false - 依赖本地版本, true - 依赖 maven 版本
RELEASE=false
# AI CLOUD 云平台
MOGO_CLOUD_COMMONS_VERSION= 1.0.0
MOGO_CLOUD_HTTPDNS_VERSION= 1.0.0
MOGO_CLOUD_PASSPORT_VERSION=1.0.0
MOGO_CLOUD_TANLU_VERSION= 1.0.0
MOGO_CLOUD_REALTIME_VERSION=1.0.0
MOGO_COMMONS_VERSION=1.0.4-SNAPSHOT
MOGO_HTTPDNS_VERSION=1.0.4-SNAPSHOT
MOGO_PASSPORT_VERSION=1.0.4-SNAPSHOT
MOGO_SOCKET_VERSION=1.0.4-SNAPSHOT
MOGO_REALTIME_VERSION=1.0.4-SNAPSHOT
MOGO_TANLU_VERSION=1.0.4-SNAPSHOT

View File

@@ -26,11 +26,20 @@ uploadArchives {
mavenDeployer {
println project.name
String versionNameKey = "${project.name.replace("-", "_").toUpperCase()}_VERSION"
String versionName = getVersionNameValue(versionNameKey)
println versionName
if (versionName == null || versionName.equals("")) {
project.logger.error("undefined versionName in root gradle.properties by ${versionNameKey}")
}
pom.project {
packaging = 'aar'
groupId = GROUP
artifactId = POM_ARTIFACT_ID
version = VERSION_NAME
version = versionName
}
repository(url: rootProject.RELEASE_REPOSITORY_URL) {
@@ -43,3 +52,19 @@ uploadArchives {
}
}
}
def getVersionNameValue(String key) {
File file = rootProject.file('gradle.properties')
String value = "";
if (file.exists()) {
//加载资源
InputStream inputStream = file.newDataInputStream();
Properties properties = new Properties()
properties.load(inputStream)
if (properties.containsKey(key)) {
value = properties.getProperty(key)
}
}
return value
}

6
modules.txt Normal file
View File

@@ -0,0 +1,6 @@
:foudations:mogo-httpdns
:foudations:mogo-passport
:foudations:mogo-commons
:foudations:mogo-socket
:modules:mogo-realtime
:modules:mogo-tanlu

View File

@@ -29,9 +29,12 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(path: ':foudations:mogo-passport')
// implementation project(":foudations:mogo-commons")
implementation 'com.mogo.cloud:commons:1.0.2-SNAPSHOT'
// implementation project(":foudations:mogo-socket")
implementation 'com.mogo.cloud:socket:1.0.2-SNAPSHOT'
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
implementation "com.mogo.cloud:socket:${MOGO_SOCKET_VERSION}"
} else {
implementation project(":foudations:mogo-socket")
implementation project(":foudations:mogo-commons")
}
}

View File

@@ -38,8 +38,11 @@ dependencies {
implementation rootProject.ext.dependencies.rxjava
implementation rootProject.ext.dependencies.rxandroid
// implementation project(path: ':foudations:mogo-commons')
implementation 'com.mogo.cloud:commons:1.0.2-SNAPSHOT'
if (Boolean.valueOf(RELEASE)) {
implementation "com.mogo.cloud:commons:${MOGO_COMMONS_VERSION}"
} else {
implementation project(path: ':foudations:mogo-commons')
}
}

3
upload.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
./gradlew :foudations:mogo-httpdns:clean :foudations:mogo-httpdns:uploadArchives