Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tooling] Migrate bazel to bzlmod and update all rules #175

Merged
merged 12 commits into from
Jan 15, 2025
19 changes: 10 additions & 9 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ RUST_VERSION = "1.83.0"

OKHTTP_VERSION = "4.12.0"

LIFECYCLE_VERSION = "2.6.1"
LIFECYCLE_VERSION = "2.8.7"

COMPOSE_VERSION = "1.4.0"
COMPOSE_VERSION = "1.7.0"

KOTLIN_COMPILE_VERSION = "2.1.0"

Expand Down Expand Up @@ -170,25 +170,24 @@ maven.install(
"com.michael-bull.kotlin-result:kotlin-result-jvm:1.1.18",
"com.google.code.gson:gson:2.10.1",
"com.squareup.okhttp3:okhttp:{}".format(OKHTTP_VERSION),
"androidx.startup:startup-runtime:1.1.1",
"androidx.core:core:1.9.0",
"net.bytebuddy:byte-buddy:1.12.19",
"androidx.startup:startup-runtime:1.2.0",
"androidx.core:core:1.15.0",
"com.google.guava:listenablefuture:1.0", #required by androidx.lifecycle:lifecycle-process below
"androidx.lifecycle:lifecycle-common:{}".format(LIFECYCLE_VERSION),
"androidx.lifecycle:lifecycle-process:{}".format(LIFECYCLE_VERSION),
"org.jetbrains.kotlin:kotlin-stdlib:{}".format(KOTLIN_STD_VERSION),
"androidx.emoji2:emoji2:1.2.0",
"androidx.emoji2:emoji2:1.5.0",
"androidx.collection:collection:1.4.5",

# Compose
"org.jetbrains.kotlin:kotlin-compose-compiler-plugin-embeddable:{}".format(KOTLIN_COMPILE_VERSION),
"org.jetbrains:annotations:26.0.1",
"androidx.core:core-ktx:1.15.0",
"androidx.appcompat:appcompat:1.7.0",
"androidx.activity:activity-compose:1.7.0",
"androidx.activity:activity-compose:1.9.3",
"androidx.compose.material:material:{}".format(COMPOSE_VERSION),
"androidx.compose.ui:ui:{}".format(COMPOSE_VERSION),
"androidx.compose.ui:ui-geometry:{}".format(COMPOSE_VERSION),
"androidx.compose.ui:ui-unit:{}".format(COMPOSE_VERSION),
"androidx.compose.ui:ui-tooling:{}".format(COMPOSE_VERSION),
"androidx.compose.runtime:runtime:{}".format(COMPOSE_VERSION),
"androidx.annotation:annotation-jvm:1.9.1",
],
Expand All @@ -197,6 +196,8 @@ maven.install(
"https://maven.google.com",
],
version_conflict_policy = "pinned",
aar_import_bzl_label = "@rules_android//rules:rules.bzl",
use_starlark_android_rules = True,
)

# Test artifacts
Expand Down
9 changes: 5 additions & 4 deletions examples/android/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ _maven_deps = [
artifact("androidx.core:core"),
artifact("androidx.startup:startup-runtime"),
artifact("androidx.lifecycle:lifecycle-common"),
artifact("androidx.lifecycle:lifecycle-common-jvm"),
artifact("androidx.lifecycle:lifecycle-process"),
artifact("androidx.appcompat:appcompat"),
artifact("androidx.activity:activity-compose"),
artifact("androidx.compose.material:material"),
artifact("com.michael-bull.kotlin-result:kotlin-result-jvm"),
artifact("com.google.code.gson:gson"),
artifact("androidx.annotation:annotation-jvm"),
artifact("androidx.compose.ui:ui"),
artifact("androidx.compose.ui:ui-geometry"),
artifact("androidx.compose.ui:ui-unit"),
artifact("androidx.compose.runtime:runtime"),
artifact("androidx.compose.runtime:runtime_android"),
artifact("androidx.compose.ui:ui_android"),
artifact("androidx.compose.ui:ui-geometry_android"),
artifact("androidx.compose.ui:ui-unit_android"), # Why do I need to prepend android to these?
artifact("com.squareup.okio:okio"),
artifact("com.squareup.okio:okio-jvm"),
artifact("org.jetbrains.kotlin:kotlin-stdlib"),
Expand Down
1 change: 0 additions & 1 deletion platform/jvm/capture/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,5 @@ bitdrift_kt_android_local_test(
artifact("org.mockito:mockito-inline"),
artifact("com.nhaarman.mockitokotlin2:mockito-kotlin"),
artifact("com.squareup.okhttp3:mockwebserver"),
artifact("net.bytebuddy:byte-buddy"),
],
)
6 changes: 3 additions & 3 deletions platform/jvm/gradle-test-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dependencies {
implementation(project(":capture-apollo"))
implementation(project(":capture-timber"))
implementation(libs.androidx.material3.android)
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.compose.material:material:1.4.0")
implementation("androidx.activity:activity-compose:1.8.0")
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.compose.material:material:1.7.6")
implementation("androidx.activity:activity-compose:1.9.3")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
Expand Down
14 changes: 7 additions & 7 deletions platform/jvm/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[versions]
androidBenchkmarkPlugin = "1.2.4"
androidGradlePlugin = "8.2.2" # have to pin to this version due to 8.3.x breaking our lint https://issuetracker.google.com/issues/332755363
androidGradlePlugin = "8.8.0" # have to pin to this version due to 8.3.x breaking our lint https://issuetracker.google.com/issues/332755363
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice they literally released the 8.8 stable version with the fix we needed last week

apollo = "4.1.0"
appcompat = "1.5.1"
appcompat = "1.7.0"
assertjCore = "3.22.0"
androidxCore = "1.9.0"
androidxTestCore = "1.6.0"
androidxCore = "1.15.0"
androidxTestCore = "1.6.1"
detektPlugin = "1.23.7"
dokkaPlugin = "1.9.20"
gson = "2.10.1"
jsr305 = "3.0.2"
junit = "4.13.2"
kotlinResultJvm = "1.1.18"
lifecycleCommon = "2.6.1"
lifecycleCommon = "2.8.7"
mavenPublishPlugin = "0.28.0"
kotlin = "2.1.0"
mockitoCore = "4.9.0"
Expand All @@ -22,10 +22,10 @@ okhttp = "4.12.0"
robolectric = "4.13"
rustAndroidPlugin = "0.9.5"
material3Android = "1.2.1"
startupRuntime = "1.1.1"
startupRuntime = "1.2.0"
timber = "5.0.1"
truth = "1.1.4"
ui = "1.4.0"
ui = "1.7.6"

[libraries]
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
Expand Down
2 changes: 1 addition & 1 deletion platform/jvm/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading