From ce62e3fc9902cd26174a86ccc274fbaf774fc24c Mon Sep 17 00:00:00 2001 From: "Ian G. Clifton" <1033551+IanGClifton@users.noreply.github.com> Date: Tue, 1 Mar 2022 09:37:38 -0800 Subject: [PATCH] [All] Update to Compose 1.1.1 (#743) * [All] Update to Compose 1.1.1 This also updates spotless to 6.3, ktlint to 0.44.0, and some other minor/bugfix library updates. * Updated accompanist and material libraries * Updated material3 to 1.0.0-alpha06 * Disabled CityMapViewTests Co-authored-by: Ian G. Clifton --- .../samples/crane/details/CityMapViewTests.kt | 2 ++ Crane/build.gradle | 2 +- .../com/example/crane/buildsrc/Dependencies.kt | 10 +++++----- JetNews/app/build.gradle | 10 +++++----- JetNews/build.gradle | 10 +++++----- Jetcaster/build.gradle | 2 +- .../example/jetcaster/buildsrc/dependencies.kt | 14 +++++++------- .../jetchat/components/JetchatScaffold.kt | 4 ++-- Jetchat/build.gradle | 2 +- .../compose/jetchat/buildsrc/dependencies.kt | 16 ++++++++-------- Jetsnack/build.gradle | 2 +- .../example/jetsnack/buildsrc/Dependencies.kt | 12 ++++++------ Jetsurvey/app/build.gradle | 1 - Jetsurvey/build.gradle | 2 +- .../compose/jetsurvey/buildsrc/dependencies.kt | 16 +++++++--------- Owl/build.gradle | 2 +- .../com/example/owl/buildsrc/Dependencies.kt | 10 +++++----- 17 files changed, 58 insertions(+), 59 deletions(-) diff --git a/Crane/app/src/androidTest/java/androidx/compose/samples/crane/details/CityMapViewTests.kt b/Crane/app/src/androidTest/java/androidx/compose/samples/crane/details/CityMapViewTests.kt index dcb0960d1d..95a9c9e2ad 100644 --- a/Crane/app/src/androidTest/java/androidx/compose/samples/crane/details/CityMapViewTests.kt +++ b/Crane/app/src/androidTest/java/androidx/compose/samples/crane/details/CityMapViewTests.kt @@ -33,6 +33,7 @@ import dagger.hilt.android.testing.HiltAndroidTest import junit.framework.TestCase.assertEquals import junit.framework.TestCase.assertTrue import org.junit.Before +import org.junit.Ignore import org.junit.Rule import org.junit.Test import java.util.concurrent.CountDownLatch @@ -40,6 +41,7 @@ import java.util.concurrent.TimeUnit import javax.inject.Inject import kotlin.math.pow +@Ignore("To be fixed in https://github.com/android/compose-samples/issues/746") @HiltAndroidTest class CityMapViewTests { @Inject diff --git a/Crane/build.gradle b/Crane/build.gradle index f992012133..beebbecd04 100644 --- a/Crane/build.gradle +++ b/Crane/build.gradle @@ -30,7 +30,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Crane/buildSrc/src/main/java/com/example/crane/buildsrc/Dependencies.kt b/Crane/buildSrc/src/main/java/com/example/crane/buildsrc/Dependencies.kt index 1d62e9dd8b..45ce9dc813 100644 --- a/Crane/buildSrc/src/main/java/com/example/crane/buildsrc/Dependencies.kt +++ b/Crane/buildSrc/src/main/java/com/example/crane/buildsrc/Dependencies.kt @@ -17,11 +17,11 @@ package com.example.crane.buildsrc object Versions { - const val ktLint = "0.43.2" + const val ktLint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.1" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" const val ktLint = "com.pinterest:ktlint:${Versions.ktLint}" object GoogleMaps { @@ -34,7 +34,7 @@ object Libs { } object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val insets = "com.google.accompanist:accompanist-insets:$version" } @@ -60,7 +60,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" const val runtime = "androidx.compose.runtime:runtime:$version" const val runtimeLivedata = "androidx.compose.runtime:runtime-livedata:$version" @@ -75,7 +75,7 @@ object Libs { } object Lifecycle { - private const val version = "2.4.0" + private const val version = "2.4.1" const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:$version" const val viewModelKtx = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" } diff --git a/JetNews/app/build.gradle b/JetNews/app/build.gradle index 6383a2a96b..464af50b36 100644 --- a/JetNews/app/build.gradle +++ b/JetNews/app/build.gradle @@ -112,12 +112,12 @@ dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation "androidx.activity:activity-compose:1.4.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.4.0" - implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0" - implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0" + implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1" + implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.4.1" + implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.1" + implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1" - implementation 'androidx.navigation:navigation-compose:2.4.0' + implementation 'androidx.navigation:navigation-compose:2.4.1' implementation "androidx.window:window:1.0.0" diff --git a/JetNews/build.gradle b/JetNews/build.gradle index 70f306259a..92ece7f4df 100644 --- a/JetNews/build.gradle +++ b/JetNews/build.gradle @@ -16,9 +16,9 @@ buildscript { ext.kotlin_version = '1.6.10' - ext.compose_version = '1.1.0' + ext.compose_version = '1.1.1' ext.coroutines_version = '1.6.0' - ext.accompanist_version = '0.23.0' + ext.accompanist_version = '0.23.1' repositories { google() @@ -26,13 +26,13 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.0' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { @@ -48,7 +48,7 @@ subprojects { targetExclude("$buildDir/**/*.kt") targetExclude('bin/**/*.kt') - ktlint("0.43.2") + ktlint("0.44.0") licenseHeaderFile rootProject.file('spotless/copyright.kt') } } diff --git a/Jetcaster/build.gradle b/Jetcaster/build.gradle index 2501b00c26..97f00721b3 100644 --- a/Jetcaster/build.gradle +++ b/Jetcaster/build.gradle @@ -30,7 +30,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Jetcaster/buildSrc/src/main/java/com/example/jetcaster/buildsrc/dependencies.kt b/Jetcaster/buildSrc/src/main/java/com/example/jetcaster/buildsrc/dependencies.kt index a7eff583ba..84f3dfdb13 100644 --- a/Jetcaster/buildSrc/src/main/java/com/example/jetcaster/buildsrc/dependencies.kt +++ b/Jetcaster/buildSrc/src/main/java/com/example/jetcaster/buildsrc/dependencies.kt @@ -17,15 +17,15 @@ package com.example.jetcaster.buildsrc object Versions { - const val ktlint = "0.43.2" + const val ktlint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.1.5" object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val insets = "com.google.accompanist:accompanist-insets:$version" const val pager = "com.google.accompanist:accompanist-pager:$version" } @@ -71,7 +71,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" @get:JvmStatic val snapshotUrl: String @@ -90,14 +90,14 @@ object Libs { } object Lifecycle { - private const val version = "2.4.0" + private const val version = "2.4.1" const val runtime = "androidx.lifecycle:lifecycle-runtime-ktx:$version" const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:$version" const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" } object Navigation { - const val navigation = "androidx.navigation:navigation-compose:2.4.0" + const val navigation = "androidx.navigation:navigation-compose:2.4.1" } object Test { @@ -114,7 +114,7 @@ object Libs { } object Room { - private const val version = "2.4.0" + private const val version = "2.4.2" const val runtime = "androidx.room:room-runtime:${version}" const val ktx = "androidx.room:room-ktx:${version}" const val compiler = "androidx.room:room-compiler:${version}" diff --git a/Jetchat/app/src/main/java/com/example/compose/jetchat/components/JetchatScaffold.kt b/Jetchat/app/src/main/java/com/example/compose/jetchat/components/JetchatScaffold.kt index 2934a6174a..6473d1dc5f 100644 --- a/Jetchat/app/src/main/java/com/example/compose/jetchat/components/JetchatScaffold.kt +++ b/Jetchat/app/src/main/java/com/example/compose/jetchat/components/JetchatScaffold.kt @@ -19,7 +19,7 @@ package com.example.compose.jetchat.components import androidx.compose.material3.DrawerState import androidx.compose.material3.DrawerValue.Closed import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.NavigationDrawer +import androidx.compose.material3.ModalNavigationDrawer import androidx.compose.material3.rememberDrawerState import androidx.compose.runtime.Composable import com.example.compose.jetchat.theme.JetchatTheme @@ -33,7 +33,7 @@ fun JetchatScaffold( content: @Composable () -> Unit ) { JetchatTheme { - NavigationDrawer( + ModalNavigationDrawer( drawerState = drawerState, drawerContent = { JetchatDrawer( diff --git a/Jetchat/build.gradle b/Jetchat/build.gradle index 85c502af19..362f4fbde3 100644 --- a/Jetchat/build.gradle +++ b/Jetchat/build.gradle @@ -32,7 +32,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Jetchat/buildSrc/src/main/java/com/example/compose/jetchat/buildsrc/dependencies.kt b/Jetchat/buildSrc/src/main/java/com/example/compose/jetchat/buildsrc/dependencies.kt index 6335368472..8352fc00cb 100644 --- a/Jetchat/buildSrc/src/main/java/com/example/compose/jetchat/buildsrc/dependencies.kt +++ b/Jetchat/buildSrc/src/main/java/com/example/compose/jetchat/buildsrc/dependencies.kt @@ -17,19 +17,19 @@ package com.example.compose.jetchat.buildsrc object Versions { - const val ktlint = "0.43.2" + const val ktlint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.1.5" const val junit = "junit:junit:4.13" - const val material3 = "com.google.android.material:material:1.5.0-rc01" + const val material3 = "com.google.android.material:material:1.6.0-alpha02" object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val insets = "com.google.accompanist:accompanist-insets:$version" } @@ -57,7 +57,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" const val foundation = "androidx.compose.foundation:foundation:$version" const val layout = "androidx.compose.foundation:foundation-layout:$version" @@ -75,14 +75,14 @@ object Libs { object Material3 { const val snapshot = "" - const val version = "1.0.0-alpha04" + const val version = "1.0.0-alpha06" const val material3 = "androidx.compose.material3:material3:$version" } } object Navigation { - private const val version = "2.4.0" + private const val version = "2.4.1" const val fragment = "androidx.navigation:navigation-fragment-ktx:$version" const val uiKtx = "androidx.navigation:navigation-ui-ktx:$version" } @@ -101,7 +101,7 @@ object Libs { } object Lifecycle { - private const val version = "2.4.0" + private const val version = "2.4.1" const val extensions = "androidx.lifecycle:lifecycle-extensions:$version" const val livedata = "androidx.lifecycle:lifecycle-livedata-ktx:$version" const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" diff --git a/Jetsnack/build.gradle b/Jetsnack/build.gradle index 2b36786728..8aa6941952 100644 --- a/Jetsnack/build.gradle +++ b/Jetsnack/build.gradle @@ -29,7 +29,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Jetsnack/buildSrc/src/main/java/com/example/jetsnack/buildsrc/Dependencies.kt b/Jetsnack/buildSrc/src/main/java/com/example/jetsnack/buildsrc/Dependencies.kt index 16787df0d1..1824c08f1b 100644 --- a/Jetsnack/buildSrc/src/main/java/com/example/jetsnack/buildsrc/Dependencies.kt +++ b/Jetsnack/buildSrc/src/main/java/com/example/jetsnack/buildsrc/Dependencies.kt @@ -17,14 +17,14 @@ package com.example.jetsnack.buildsrc object Versions { - const val ktlint = "0.43.2" + const val ktlint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val insets = "com.google.accompanist:accompanist-insets:$version" const val systemuicontroller = "com.google.accompanist:accompanist-systemuicontroller:$version" const val flowlayouts = "com.google.accompanist:accompanist-flowlayout:$version" @@ -49,7 +49,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" const val foundation = "androidx.compose.foundation:foundation:${version}" const val layout = "androidx.compose.foundation:foundation-layout:${version}" @@ -69,11 +69,11 @@ object Libs { } object Lifecycle { - const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0" + const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.1" } object Navigation { - const val navigationCompose = "androidx.navigation:navigation-compose:2.4.0" + const val navigationCompose = "androidx.navigation:navigation-compose:2.4.1" } object ConstraintLayout { diff --git a/Jetsurvey/app/build.gradle b/Jetsurvey/app/build.gradle index d4094d411d..00e3ba96ba 100644 --- a/Jetsurvey/app/build.gradle +++ b/Jetsurvey/app/build.gradle @@ -97,7 +97,6 @@ dependencies { implementation Libs.AndroidX.Navigation.fragment implementation Libs.AndroidX.Navigation.uiKtx implementation Libs.AndroidX.Material.material - implementation Libs.material implementation Libs.AndroidX.Lifecycle.viewmodel implementation Libs.AndroidX.Lifecycle.viewModelCompose diff --git a/Jetsurvey/build.gradle b/Jetsurvey/build.gradle index 8e58f939b9..cff1eb581e 100644 --- a/Jetsurvey/build.gradle +++ b/Jetsurvey/build.gradle @@ -29,7 +29,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Jetsurvey/buildSrc/src/main/java/com/example/compose/jetsurvey/buildsrc/dependencies.kt b/Jetsurvey/buildSrc/src/main/java/com/example/compose/jetsurvey/buildsrc/dependencies.kt index 151e85c004..c7449ca3ea 100644 --- a/Jetsurvey/buildSrc/src/main/java/com/example/compose/jetsurvey/buildsrc/dependencies.kt +++ b/Jetsurvey/buildSrc/src/main/java/com/example/compose/jetsurvey/buildsrc/dependencies.kt @@ -17,19 +17,17 @@ package com.example.compose.jetsurvey.buildsrc object Versions { - const val ktlint = "0.43.2" + const val ktlint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" const val jdkDesugar = "com.android.tools:desugar_jdk_libs:1.1.5" const val junit = "junit:junit:4.13" - const val material = "com.google.android.material:material:1.3.0" - object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val permissions = "com.google.accompanist:accompanist-permissions:$version" } @@ -52,7 +50,7 @@ object Libs { const val coreKtx = "androidx.core:core-ktx:1.7.0" object Lifecycle { - private const val version = "2.4.0" + private const val version = "2.4.1" const val viewModelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:$version" const val viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$version" } @@ -63,7 +61,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" @get:JvmStatic val snapshotUrl: String @@ -82,13 +80,13 @@ object Libs { } object Navigation { - private const val version = "2.4.0" + private const val version = "2.4.1" const val fragment = "androidx.navigation:navigation-fragment-ktx:$version" const val uiKtx = "androidx.navigation:navigation-ui-ktx:$version" } object Material { - private const val version = "1.3.0" + private const val version = "1.6.0-alpha02" const val material = "com.google.android.material:material:$version" } diff --git a/Owl/build.gradle b/Owl/build.gradle index e1ed3c905d..d1f3e6e65b 100644 --- a/Owl/build.gradle +++ b/Owl/build.gradle @@ -29,7 +29,7 @@ buildscript { } plugins { - id 'com.diffplug.spotless' version '6.2.0' + id 'com.diffplug.spotless' version '6.3.0' } subprojects { diff --git a/Owl/buildSrc/src/main/java/com/example/owl/buildsrc/Dependencies.kt b/Owl/buildSrc/src/main/java/com/example/owl/buildsrc/Dependencies.kt index 3b0bee3702..15363c5a96 100644 --- a/Owl/buildSrc/src/main/java/com/example/owl/buildsrc/Dependencies.kt +++ b/Owl/buildSrc/src/main/java/com/example/owl/buildsrc/Dependencies.kt @@ -17,14 +17,14 @@ package com.example.owl.buildsrc object Versions { - const val ktlint = "0.43.2" + const val ktlint = "0.44.0" } object Libs { - const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.0" + const val androidGradlePlugin = "com.android.tools.build:gradle:7.1.2" object Accompanist { - const val version = "0.23.0" + const val version = "0.23.1" const val insets = "com.google.accompanist:accompanist-insets:$version" } @@ -49,7 +49,7 @@ object Libs { object AndroidX { const val coreKtx = "androidx.core:core-ktx:1.7.0" - const val navigation = "androidx.navigation:navigation-compose:2.4.0" + const val navigation = "androidx.navigation:navigation-compose:2.4.1" object Activity { const val activityCompose = "androidx.activity:activity-compose:1.4.0" @@ -57,7 +57,7 @@ object Libs { object Compose { const val snapshot = "" - const val version = "1.1.0" + const val version = "1.1.1" const val animation = "androidx.compose.animation:animation:$version" const val foundation = "androidx.compose.foundation:foundation:$version"