修改依赖关系

This commit is contained in:
董宏宇
2021-01-20 16:23:08 +08:00
parent 7cfc1f7825
commit 29c1dcbe41
8 changed files with 33 additions and 57 deletions

View File

@@ -11,6 +11,11 @@ android {
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
packagingOptions {
//解决编译时com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'META-INF/rxjava.properties'这个错误
exclude 'META-INF/rxjava.properties'
}
}
buildTypes {

View File

@@ -10,7 +10,7 @@ ext {
dependencies = [
// androidx
androidxappcompat : "androidx.appcompat:appcompat:1.1.0",
androidxccorektx : "androidx.core:core-ktx:1.3.0",
androidxccorektx : "androidx.core:core-ktx:1.3.2",
androidxconstraintlayout : "androidx.constraintlayout:constraintlayout:1.1.3",
boostmultidex : "com.bytedance.boost_multidex:boost_multidex:1.0.1",
androidxviewpager2 : "androidx.viewpager2:viewpager2:1.0.0",
@@ -55,9 +55,9 @@ ext {
// 公司服务 - 埋点
analytics : "com.elegant.analytics:analytics:1.1.28",
retrofit : "com.squareup.retrofit2:retrofit:2.6.0",
retrofitadapter : "com.squareup.retrofit2:adapter-rxjava2:2.6.0",
retrofitconvertergson : "com.squareup.retrofit2:converter-gson:2.6.0",
retrofit : "com.squareup.retrofit2:retrofit:2.1.0",
retrofitadapter : "com.squareup.retrofit2:adapter-rxjava2:2.1.0",
retrofitconvertergson : "com.squareup.retrofit2:converter-gson:2.1.0",
retrofitconverterscalars : "com.squareup.retrofit2:converter-scalars:2.1.0",
@@ -116,6 +116,10 @@ ext {
androidxroomruntime : "androidx.room:room-runtime:2.2.3",
androidxroomcompiler : "androidx.room:room-compiler:2.2.3",
androidxroomktx : "androidx.room:room-ktx:2.2.3",
mogoutils : "com.mogo.commons:mogo-utils:2.0.12",
]
}

View File

@@ -27,15 +27,16 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation project(path: ':foudations:mogo-passport')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation rootProject.ext.dependencies.androidxccorektx
implementation rootProject.ext.dependencies.androidxappcompat
api rootProject.ext.dependencies.retrofit
api rootProject.ext.dependencies.retrofitadapter
api rootProject.ext.dependencies.retrofitconvertergson
api rootProject.ext.dependencies.retrofitconverterscalars
implementation project(path: ':foudations:mogo-httpdns')
implementation project(path: ':foudations:mogo-passport')
}

View File

@@ -1,24 +0,0 @@
package com.mogo.cloud.commons
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.Assert.*
/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.mogo.cloud.commons.test", appContext.packageName)
}
}

View File

@@ -1,17 +0,0 @@
package com.mogo.cloud.commons
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

View File

@@ -33,12 +33,9 @@ android {
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation rootProject.ext.dependencies.androidxccorektx
implementation rootProject.ext.dependencies.androidxappcompat
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()

View File

@@ -29,7 +29,7 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation rootProject.ext.dependencies.androidxappcompat
api rootProject.ext.dependencies.mogoutils
// passport
implementation 'com.zhidao.tcloginsdk:tclogin:1.1.5.1'
api project(path: ':foudations:mogo-httpdns')

View File

@@ -1,11 +1,15 @@
package com.mogo.cloud.passport;
import android.text.TextUtils;
import com.mogo.cloud.httpdns.MogoHttpDnsConfig;
import com.mogo.utils.logger.Logger;
/**
* SDK 中的参数
*/
public class MoGoAiCloudClientConfig {
private static final String TAG = "MoGoAiCloudClientConfig";
/**
* 网络模式
@@ -104,10 +108,16 @@ public class MoGoAiCloudClientConfig {
}
public String getToken() {
if (TextUtils.isEmpty(token)) {
Logger.e(TAG, "Token 获取失败……");
}
return token;
}
public String getSn() {
if (TextUtils.isEmpty(sn)) {
Logger.e(TAG, "SN 获取失败……");
}
return sn;
}