Skip to content

Commit a8b8d14

Browse files
committed
Map compse versions, fix deps toolchain version
1 parent f2678cd commit a8b8d14

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

examples/deps/bzl/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kt_javac_options(
99
name = "default_javac_options",
1010
)
1111

12-
KOTLIN_LANGUAGE_LEVEL = "2.1.0"
12+
KOTLIN_LANGUAGE_LEVEL = "2.1"
1313

1414
define_kt_toolchain(
1515
name = "experimental_toolchain",

examples/jetpack_compose/WORKSPACE

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22

3+
KOTLIN_TO_COMPOSE = {
4+
"1.9.5": "1.1.1",
5+
"2.0.0": "1.2.1",
6+
"2.1.0": "1.7.6",
7+
}
8+
39
# Setup Kotlin
410
http_archive(
511
name = "rules_kotlin",
@@ -34,10 +40,10 @@ maven_install(
3440
"androidx.core:core-ktx:1.7.0",
3541
"androidx.appcompat:appcompat:1.4.1",
3642
"androidx.activity:activity-compose:1.4.0",
37-
"androidx.compose.material:material:{}".format(versions.KOTLIN_CURRENT_COMPILER_RELEASE.version),
38-
"androidx.compose.ui:ui:{}".format(versions.KOTLIN_CURRENT_COMPILER_RELEASE.version),
39-
"androidx.compose.ui:ui-tooling:{}".format(versions.KOTLIN_CURRENT_COMPILER_RELEASE.version),
40-
"androidx.compose.runtime:runtime:{}".format(versions.KOTLIN_CURRENT_COMPILER_RELEASE.version),
43+
"androidx.compose.material:material:{}".format(KOTLIN_TO_COMPOSE[versions.KOTLIN_CURRENT_COMPILER_RELEASE.version]),
44+
"androidx.compose.ui:ui:{}".format(KOTLIN_TO_COMPOSE[versions.KOTLIN_CURRENT_COMPILER_RELEASE.version]),
45+
"androidx.compose.ui:ui-tooling:{}".format(KOTLIN_TO_COMPOSE[versions.KOTLIN_CURRENT_COMPILER_RELEASE.version]),
46+
"androidx.compose.runtime:runtime:{}".format(KOTLIN_TO_COMPOSE[versions.KOTLIN_CURRENT_COMPILER_RELEASE.version]),
4147
],
4248
repositories = [
4349
"https://maven.google.com",

0 commit comments

Comments
 (0)