From 1f5f51da68f152d026d45a72e207ed26104f7ffb Mon Sep 17 00:00:00 2001 From: chenjuntao Date: Thu, 13 Jun 2019 10:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80=20androidX=20=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 35 ++++++++++-------- {libraries/gid => app/libs}/gid-1.0-beta4.aar | Bin dependencies.gradle | 23 ++++++++---- gradle.properties | 2 +- libraries/Matisse/build.gradle | 9 ++--- libraries/gid/build.gradle | 2 - libraries/im/build.gradle | 2 +- 7 files changed, 40 insertions(+), 33 deletions(-) rename {libraries/gid => app/libs}/gid-1.0-beta4.aar (100%) delete mode 100644 libraries/gid/build.gradle diff --git a/app/build.gradle b/app/build.gradle index 3da664ba0c..2990fe08bc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -192,13 +192,25 @@ dependencies { debugImplementation "com.facebook.stetho:stetho-okhttp3:${stetho}" debugImplementation "com.squareup.okhttp3:logging-interceptor:${okHttp}" - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'com.google.android.material:material:1.0.0' - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.annotation:annotation:1.1.0' - implementation 'androidx.percentlayout:percentlayout:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation "androidx.core:core:${core}" + implementation "androidx.fragment:fragment:${fragment}" + implementation "androidx.multidex:multidex:${multiDex}" + implementation "androidx.appcompat:appcompat:${appCompat}" + implementation "androidx.cardview:cardview:${cardView}" + implementation "androidx.annotation:annotation:${annotation}" + implementation "androidx.percentlayout:percentlayout:${percentLayout}" + implementation "androidx.constraintlayout:constraintlayout:${constraintLayout}" + implementation "androidx.recyclerview:recyclerview:${recyclerView}" + implementation "androidx.lifecycle:lifecycle-runtime:${lifeCycle}" + implementation "androidx.lifecycle:lifecycle-extensions:${lifeCycle}" + kapt "androidx.lifecycle:lifecycle-compiler:${lifeCycle}" + implementation "androidx.room:room-runtime:${room}" + implementation "androidx.room:room-rxjava2:${room}" + kapt "androidx.room:room-compiler:${room}" + kapt "androidx.databinding:databinding-compiler:${databinding}" + + implementation "com.google.android.material:material:${material}" + implementation "com.kyleduo.switchbutton:library:${switchButton}" implementation "com.facebook.fresco:fresco:${fresco}" @@ -240,18 +252,10 @@ dependencies { implementation "com.tencent.bugly:crashreport_upgrade:${buglyTinkerSupport}" implementation "pub.devrel:easypermissions:${easypermissions}" - // mvvm - implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0' - kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0' - implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' - implementation 'androidx.room:room-runtime:2.0.0' - kapt 'androidx.room:room-compiler:2.0.0' - implementation 'androidx.room:room-rxjava2:2.0.0' implementation 'com.google.android:flexbox:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - kapt 'androidx.databinding:databinding-compiler:3.4.1' implementation 'com.contrarywind:Android-PickerView:4.1.3' @@ -274,7 +278,6 @@ dependencies { implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:5.3.1" implementation 'com.walkud.rom.checker:RomChecker:1.0.0' - implementation project(':libraries:gid') implementation project(':libraries:LGLibrary') implementation project(':libraries:MTA') implementation project(':libraries:QQShare') diff --git a/libraries/gid/gid-1.0-beta4.aar b/app/libs/gid-1.0-beta4.aar similarity index 100% rename from libraries/gid/gid-1.0-beta4.aar rename to app/libs/gid-1.0-beta4.aar diff --git a/dependencies.gradle b/dependencies.gradle index 9957a53b23..077aa51bb2 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -11,9 +11,21 @@ ext { versionName = "3.6.5" applicationId = "com.gh.gamecenter" - //Libraries - androidSupport = "27.1.1" - multidex = "1.0.3" + // AndroidX + core = "1.0.2" + multiDex = "2.0.1" + appCompat = "1.0.2" + cardView = "1.0.0" + fragment = "1.0.0" + annotation = "1.1.0" + percentLayout = "1.0.0" + constraintLayout = "1.1.3" + databinding = "3.4.1" + recyclerView = "1.0.0" + lifeCycle = "2.0.0" + room = "2.0.0" + + material = "1.0.0" butterKnife = "10.1.0" @@ -52,11 +64,6 @@ ext { // 权限申请库 easypermissions = "1.0.0" - constraintLayout = "1.0.2" - - archLifecycleVersion = "1.1.1" - archRoomVersion = "1.1.1" - // httpdns = "1.1.3"; expandableLayout = "2.9.2" diff --git a/gradle.properties b/gradle.properties index 12be34b9e6..a1963e7bb8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -65,5 +65,5 @@ TINKER_BASE_APK_DIR=app-0603-17-52-20_386c7b19 android.useAndroidX=true android.enableJetifier=true -# 需后续调整才能使用 R8 +# tinker 要新版本才支持 R8,在没有更新 tinker 的情况下暂时关闭 R8。https://github.com/Tencent/tinker/issues/1099 android.enableR8 = false diff --git a/libraries/Matisse/build.gradle b/libraries/Matisse/build.gradle index d84d38863e..73b8e31cf9 100644 --- a/libraries/Matisse/build.gradle +++ b/libraries/Matisse/build.gradle @@ -22,14 +22,13 @@ android { } } -ext.supportLibVersion = '27.1.1' - dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.0.2' - implementation 'androidx.annotation:annotation:1.1.0' - implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation "androidx.appcompat:appcompat:${appCompat}" + implementation "androidx.annotation:annotation:${annotation}" + implementation "androidx.recyclerview:recyclerview:${recyclerView}" + implementation 'it.sephiroth.android.library.imagezoom:library:1.0.4' implementation "com.facebook.fresco:fresco:${fresco}" diff --git a/libraries/gid/build.gradle b/libraries/gid/build.gradle deleted file mode 100644 index f3d888b2ff..0000000000 --- a/libraries/gid/build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -configurations.maybeCreate("default") -artifacts.add("default", file('gid-1.0-beta4.aar')) \ No newline at end of file diff --git a/libraries/im/build.gradle b/libraries/im/build.gradle index 2670c3f600..0717166311 100644 --- a/libraries/im/build.gradle +++ b/libraries/im/build.gradle @@ -15,7 +15,7 @@ android { dependencies { api fileTree(include: '*.jar', dir: 'libs') implementation "com.facebook.fresco:fresco:${fresco}" - implementation 'androidx.appcompat:appcompat:1.0.2' + implementation "androidx.appcompat:appcompat:${appCompat}" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } repositories {