Skip to content

Commit 68ef1fa

Browse files
committed
(General) Bump Kotlin & Compose versions; Use Compose BOM
1 parent 8b20004 commit 68ef1fa

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

app/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ android {
5353
compose = true
5454
}
5555
composeOptions {
56-
kotlinCompilerExtensionVersion = Versions.COMPOSE
56+
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER
5757
}
5858
packagingOptions {
5959
resources {
@@ -108,6 +108,7 @@ dependencies {
108108
// Compose libs
109109

110110
implementations(
111+
platform(Dependencies.Compose.BOM),
111112
Dependencies.Compose.UI,
112113
Dependencies.Compose.UI_TOOLING,
113114
Dependencies.Compose.ANIMATION,
@@ -122,7 +123,7 @@ dependencies {
122123
androidTestImplementations(
123124
Dependencies.AndroidX.Test.JUNIT,
124125
Dependencies.AndroidX.Test.ESPRESSO_CORE,
125-
Dependencies.Compose.Test.JUNIT
126+
Dependencies.Compose.Test.JUNIT,
126127
)
127128
debugImplementations(
128129
Dependencies.Compose.Test.TOOLING,

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fun com.android.build.gradle.BaseExtension.baselibraryConfig() {
107107
}
108108

109109
buildFeatures.compose = true
110-
composeOptions.kotlinCompilerExtensionVersion = Versions.COMPOSE
110+
composeOptions.kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER
111111

112112
packagingOptions.resources.excludes += listOf(
113113
"META-INF/DEPENDENCIES.txt",

buildSrc/src/main/java/Dependencies.kt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,20 @@ object Dependencies {
1515

1616
object Compose {
1717

18-
const val UI = "androidx.compose.ui:ui:${Versions.COMPOSE}"
19-
const val RUNTIME = "androidx.compose.runtime:runtime:${Versions.COMPOSE}"
20-
const val MATERIAL_2 = "androidx.compose.material:material:${Versions.COMPOSE}"
21-
const val MATERIAL_3 = "androidx.compose.material3:material3:${Versions.COMPOSE_MD3}"
22-
const val UI_TOOLING = "androidx.compose.ui:ui-tooling-preview:${Versions.COMPOSE}"
23-
const val ICONS_EXTENDED = "androidx.compose.material:material-icons-extended:${Versions.COMPOSE}"
24-
const val ANIMATION = "androidx.compose.animation:animation:${Versions.COMPOSE}"
25-
const val ANIMATION_GRAPHICS = "androidx.compose.animation:animation-graphics:${Versions.COMPOSE}"
18+
const val BOM = "androidx.compose:compose-bom:${Versions.COMPOSE_BOM}"
19+
const val UI = "androidx.compose.ui:ui"
20+
const val RUNTIME = "androidx.compose.runtime:runtime"
21+
const val MATERIAL_2 = "androidx.compose.material:material"
22+
const val MATERIAL_3 = "androidx.compose.material3:material3"
23+
const val UI_TOOLING = "androidx.compose.ui:ui-tooling-preview"
24+
const val ICONS_EXTENDED = "androidx.compose.material:material-icons-extended"
25+
const val ANIMATION = "androidx.compose.animation:animation"
26+
const val ANIMATION_GRAPHICS = "androidx.compose.animation:animation-graphics"
2627

2728
object Test {
2829
const val JUNIT = "androidx.compose.ui:ui-test-junit4:${Versions.COMPOSE}"
29-
const val TOOLING = "androidx.compose.ui:ui-tooling:${Versions.COMPOSE}"
30-
const val MANIFEST = "androidx.compose.ui:ui-test-manifest:${Versions.COMPOSE}"
30+
const val TOOLING = "androidx.compose.ui:ui-tooling"
31+
const val MANIFEST = "androidx.compose.ui:ui-test-manifest"
3132
}
3233
}
3334

buildSrc/src/main/java/LibraryModulePlugin.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class LibraryModulePlugin : Plugin<Project> {
4040
// Compose libs
4141

4242
implementations(
43+
platform(Dependencies.Compose.BOM),
4344
Dependencies.Compose.UI,
4445
Dependencies.Compose.UI_TOOLING,
4546
Dependencies.Compose.ANIMATION,

buildSrc/src/main/java/Versions.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ object Versions {
22

33
// Kotlin
44

5-
const val KOTLIN = "1.7.10"
5+
const val KOTLIN = "1.8.10"
66

77
// Compose
88

9-
const val COMPOSE = "1.3.0"
10-
const val COMPOSE_MD3 = "1.0.0"
9+
const val COMPOSE_BOM = "2023.01.00"
10+
const val COMPOSE = "1.3.3"
11+
const val COMPOSE_COMPILER = "1.4.3"
1112

1213
// AndroidX
1314

test/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ android {
3939
compose = true
4040
}
4141
composeOptions {
42-
kotlinCompilerExtensionVersion = Versions.COMPOSE
42+
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER
4343
}
4444
packagingOptions {
4545
resources {

0 commit comments

Comments
 (0)