From e7b2ed623e24cdb4711ed4a7b45d6615d42ad2f4 Mon Sep 17 00:00:00 2001 From: Jolanda Verhoef Date: Mon, 24 Oct 2022 13:57:47 +0100 Subject: [PATCH] Update to new Compose release --- .../apps/nowinandroid/AndroidCompose.kt | 7 ++++ core/testing/build.gradle.kts | 1 + gradle/libs.versions.toml | 32 +++++++++---------- 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/AndroidCompose.kt b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/AndroidCompose.kt index 4cb05f4d5..4da997fc3 100644 --- a/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/AndroidCompose.kt +++ b/build-logic/convention/src/main/kotlin/com/google/samples/apps/nowinandroid/AndroidCompose.kt @@ -19,6 +19,7 @@ package com.google.samples.apps.nowinandroid import com.android.build.api.dsl.CommonExtension import org.gradle.api.Project import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.dependencies import org.gradle.kotlin.dsl.getByType import java.io.File @@ -42,6 +43,12 @@ internal fun Project.configureAndroidCompose( kotlinOptions { freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters() } + + dependencies { + val bom = libs.findLibrary("androidx-compose-bom").get() + add("implementation", platform(bom)) + add("androidTestImplementation", platform(bom)) + } } } diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts index 61bff3395..5c5740eee 100644 --- a/core/testing/build.gradle.kts +++ b/core/testing/build.gradle.kts @@ -15,6 +15,7 @@ */ plugins { id("nowinandroid.android.library") + id("nowinandroid.android.library.compose") id("nowinandroid.android.hilt") } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b63d2f937..c21a8d54f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,12 @@ [versions] -accompanist = "0.24.8-beta" +accompanist = "0.26.5-rc" androidDesugarJdkLibs = "1.1.5" androidGradlePlugin = "7.3.0" androidxActivity = "1.6.0" androidxAppCompat = "1.5.1" -androidxCompose = "1.3.0-beta02" -androidxComposeRuntimeTracing = "1.0.0-alpha01" +androidxComposeBom = "2022.10.00" androidxComposeCompiler = "1.3.2" -androidxComposeMaterial3 = "1.0.0-beta03" +androidxComposeRuntimeTracing = "1.0.0-alpha01" androidxCore = "1.9.0" androidxCoreSplashscreen = "1.0.0" androidxCustomView = "1.0.0" @@ -56,19 +55,20 @@ android-desugarJdkLibs = { group = "com.android.tools", name = "desugar_jdk_libs androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "androidxActivity" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidxAppCompat" } androidx-benchmark-macro = { group = "androidx.benchmark", name = "benchmark-macro-junit4", version.ref = "androidxMacroBenchmark" } -androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation", version.ref = "androidxCompose" } -androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout", version.ref = "androidxCompose" } -androidx-compose-material-iconsExtended = { group = "androidx.compose.material", name = "material-icons-extended", version.ref = "androidxCompose" } -androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3", version.ref = "androidxComposeMaterial3" } -androidx-compose-material3-windowSizeClass = {group = "androidx.compose.material3", name = "material3-window-size-class", version.ref="androidxComposeMaterial3"} -androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime", version.ref = "androidxCompose" } -androidx-compose-runtime-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata", version.ref = "androidxCompose" } +androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "androidxComposeBom" } +androidx-compose-foundation = { group = "androidx.compose.foundation", name = "foundation" } +androidx-compose-foundation-layout = { group = "androidx.compose.foundation", name = "foundation-layout" } +androidx-compose-material-iconsExtended = { group = "androidx.compose.material", name = "material-icons-extended" } +androidx-compose-material3 = { group = "androidx.compose.material3", name = "material3" } +androidx-compose-material3-windowSizeClass = {group = "androidx.compose.material3", name = "material3-window-size-class" } +androidx-compose-runtime = { group = "androidx.compose.runtime", name = "runtime" } +androidx-compose-runtime-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata" } androidx-compose-runtime-tracing = { group = "androidx.compose.runtime", name = "runtime-tracing", version.ref = "androidxComposeRuntimeTracing" } -androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4", version.ref = "androidxCompose" } -androidx-compose-ui-testManifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "androidxCompose" } -androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling", version.ref = "androidxCompose" } -androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview", version.ref = "androidxCompose" } -androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util", version.ref = "androidxCompose" } +androidx-compose-ui-test = { group = "androidx.compose.ui", name = "ui-test-junit4" } +androidx-compose-ui-testManifest = { group = "androidx.compose.ui", name = "ui-test-manifest" } +androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" } +androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } +androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" } androidx-core-splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "androidxCoreSplashscreen" } androidx-customview-poolingcontainer = { group = "androidx.customview", name = "customview-poolingcontainer", version.ref = "androidxCustomView"}