From fc6cbbc48027408c3df21fd92d4cf8d408e30595 Mon Sep 17 00:00:00 2001 From: Yongce Tu Date: Mon, 8 Nov 2021 00:45:56 +0800 Subject: [PATCH] Upgrade JVM compatibility to Java 11 and upgrade the libraries --- android_module_common.gradle | 6 ++-- android_project_common.gradle | 44 +++++++++++++++--------------- archLintRulesTestDemo/build.gradle | 18 ++++++------ build.gradle | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/android_module_common.gradle b/android_module_common.gradle index 5393bc5..e34aa48 100644 --- a/android_module_common.gradle +++ b/android_module_common.gradle @@ -134,13 +134,13 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } pluginManager.withPlugin('kotlin-android') { kotlinOptions { - jvmTarget = "1.8" + jvmTarget = "11" } } diff --git a/android_project_common.gradle b/android_project_common.gradle index 8cf6674..39fea5b 100644 --- a/android_project_common.gradle +++ b/android_project_common.gradle @@ -39,28 +39,28 @@ ext { // Android official support 'kotlin' : '1.5.31', - 'kotlinCoroutine' : "1.4.1", + 'kotlinCoroutine' : "1.5.2", 'multidexLib' : "2.0.1", - 'androidxCore' : '1.3.2', - 'fragment' : '1.3.2', + 'androidxCore' : '1.7.0', + 'fragment' : '1.3.6', 'preference' : "1.1.1", 'palette' : "1.0.0", - 'recyclerView' : "1.2.0", - 'constraintLayout' : "2.0.4", + 'recyclerView' : "1.2.1", + 'constraintLayout' : "2.1.1", 'vectorDrawable' : "1.1.0", 'lintLib' : '30.0.2', 'archCore' : "2.1.0", - 'lifecycle' : "2.3.1", - 'room' : '2.2.6', + 'lifecycle' : "2.4.0", + 'room' : '2.3.0', 'sqlite' : "2.1.0", 'navigation' : "2.3.5", - 'paging' : "2.1.2", - 'work' : "2.5.0", - 'media2' : "1.1.2", + 'paging' : "3.0.1", + 'work' : "2.7.0", + 'media2' : "1.2.0", // test - 'testCore' : "1.3.0", - 'espresso' : "3.3.0", + 'testCore' : "1.4.0", + 'espresso' : "3.4.0", 'uiautomator' : "2.2.0", 'truth' : '1.0.1', 'hamcrest' : '2.2', @@ -113,7 +113,7 @@ ext { ], 'androidx': [ // core - 'annotation' : "androidx.annotation:annotation:1.2.0", + 'annotation' : "androidx.annotation:annotation:1.3.0", 'core' : "androidx.core:core:${versions.androidxCore}", 'coreKtx' : "androidx.core:core-ktx:${versions.androidxCore}", 'fragment' : "androidx.fragment:fragment:${versions.fragment}", @@ -122,8 +122,8 @@ ext { 'collection' : "androidx.collection:collection:1.1.0", 'collectionKtx' : "androidx.collection:collection-ktx:1.1.0", // UI - 'appcompat' : "androidx.appcompat:appcompat:1.2.0", - 'material' : "com.google.android.material:material:1.3.0", + 'appcompat' : "androidx.appcompat:appcompat:1.3.1", + 'material' : "com.google.android.material:material:1.4.0", 'preference' : "androidx.preference:preference:${versions.preference}", 'preferenceKtx' : "androidx.preference:preference-ktx:${versions.preference}", 'constraintLayout' : "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}", @@ -141,14 +141,14 @@ ext { 'viewPager2' : "androidx.viewpager2:viewpager2:1.0.0", 'vectorDrawable' : "androidx.vectordrawable:vectordrawable:${versions.vectorDrawable}", 'animatedVectorDrawable' : "androidx.vectordrawable:vectordrawable-animated:${versions.vectorDrawable}", - 'browser' : "androidx.browser:browser:1.3.0", - 'transition' : "androidx.transition:transition:1.4.0", + 'browser' : "androidx.browser:browser:1.4.0", + 'transition' : "androidx.transition:transition:1.4.1", // others 'multidex' : "androidx.multidex:multidex:${versions.multidexLib}", 'mediaSession' : "androidx.media2:media2-session:${versions.media2}", 'mediaExoPlayer' : "androidx.media2:media2-exoplayer:${versions.media2}", - 'mediarouter' : "androidx.mediarouter:mediarouter:1.2.2", - 'exifinterface' : "androidx.exifinterface:exifinterface:1.3.2", + 'mediarouter' : "androidx.mediarouter:mediarouter:1.2.5", + 'exifinterface' : "androidx.exifinterface:exifinterface:1.3.3", 'wear' : "androidx.wear:wear:1.0.0", // legacy 'coreUtils' : "androidx.legacy:legacy-support-core-utils:1.0.0", @@ -220,9 +220,9 @@ ext { 'monitor' : "androidx.test:monitor:${versions.testCore}", 'orchestrator' : "androidx.test:orchestrator:${versions.testCore}", // ext - 'junit' : "androidx.test.ext:junit:1.1.2", - 'junitKtx' : "androidx.test.ext:junit-ktx:1.1.2", - 'truthAndroidX' : "androidx.test.ext:truth:1.3.0", + 'junit' : "androidx.test.ext:junit:1.1.3", + 'junitKtx' : "androidx.test.ext:junit-ktx:1.1.3", + 'truthAndroidX' : "androidx.test.ext:truth:1.4.0", 'truth' : "com.google.truth:truth:${versions.truth}", 'truthJava8' : "com.google.truth.extensions:truth-java8-extension:${versions.truth}", // espresso diff --git a/archLintRulesTestDemo/build.gradle b/archLintRulesTestDemo/build.gradle index 49ed3fd..2b02eed 100644 --- a/archLintRulesTestDemo/build.gradle +++ b/archLintRulesTestDemo/build.gradle @@ -38,15 +38,15 @@ dependencies { implementation project(':archLib') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}" - implementation "androidx.appcompat:appcompat:1.2.0" + implementation "androidx.appcompat:appcompat:1.3.1" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.kotlinCoroutine}" // The following dependencies are just for checking new versions of library implementation "androidx.core:core-ktx:${versions.androidxCore}" implementation "androidx.fragment:fragment-ktx:${versions.fragment}" - implementation "com.google.android.material:material:1.3.0" + implementation "com.google.android.material:material:1.4.0" implementation "androidx.multidex:multidex:${versions.multidexLib}" - implementation "androidx.annotation:annotation:1.2.0" + implementation "androidx.annotation:annotation:1.3.0" implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.0.0" implementation "androidx.collection:collection-ktx:1.1.0" implementation "androidx.preference:preference-ktx:${versions.preference}" @@ -63,11 +63,11 @@ dependencies { implementation "androidx.paging:paging-runtime-ktx:${versions.paging}" implementation "androidx.work:work-runtime:${versions.work}" implementation "androidx.vectordrawable:vectordrawable:${versions.vectorDrawable}" - implementation "androidx.browser:browser:1.3.0" - implementation "androidx.transition:transition:1.4.0" + implementation "androidx.browser:browser:1.4.0" + implementation "androidx.transition:transition:1.4.1" implementation "androidx.media2:media2-session:${versions.media2}" - implementation "androidx.mediarouter:mediarouter:1.2.2" - implementation "androidx.exifinterface:exifinterface:1.3.2" + implementation "androidx.mediarouter:mediarouter:1.2.5" + implementation "androidx.exifinterface:exifinterface:1.3.3" implementation "androidx.arch.core:core-common:${versions.archCore}" implementation "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycle}" @@ -101,7 +101,7 @@ dependencies { implementation "com.airbnb.android:lottie:3.4.4" testImplementation "androidx.test:core:${versions.testCore}" - testImplementation "androidx.test.ext:junit:1.1.2" + testImplementation "androidx.test.ext:junit:1.1.3" testImplementation "androidx.test:runner:${versions.testCore}" testImplementation "androidx.test:rules:${versions.testCore}" testImplementation "org.hamcrest:hamcrest-core:${versions.hamcrest}" @@ -109,7 +109,7 @@ dependencies { testImplementation "org.powermock:powermock-api-mockito:${versions.powermock}" testImplementation "org.robolectric:robolectric:${versions.robolectric}" testImplementation "com.google.truth:truth:${versions.truth}" - testImplementation "androidx.test.ext:truth:1.3.0" + testImplementation "androidx.test.ext:truth:1.4.0" testImplementation "io.mockk:mockk:${versions.mockk}" androidTestImplementation "androidx.test.espresso:espresso-core:${versions.espresso}" diff --git a/build.gradle b/build.gradle index 58a3230..9d646b9 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" } }