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

fix(android): support java 11 #1735

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[versions]
agp = "8.7.3"
# This is the lowest version of AGP supported by the measure gradle plugin
agp741 = "7.4.1"
bundletool = "1.17.0"
# android-tools is used for calculating app size and aab size by the gradle plugin.
# The version should remain compatible with lower versions of android gradle plugin. New versions
Expand Down Expand Up @@ -82,7 +84,7 @@ androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling
androidx-compose-runtime-android = { module = "androidx.compose.runtime:runtime-android", version.ref = "androidx-runtime-android" }
androidx-uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "androidx-uiautomator" }
androidx-orchestrator = { module = "androidx.test:orchestrator", version.ref = "orchestrator" }
agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
agp741 = { module = "com.android.tools.build:gradle", version.ref = "agp741" }
asm-commons = { module = "org.ow2.asm:asm-commons", version.ref = "asm-util" }
asm-util = { module = "org.ow2.asm:asm-util", version.ref = "asm-util" }
android-tools-bundletool = { module = "com.android.tools.build:bundletool", version.ref = "bundletool" }
Expand Down
11 changes: 7 additions & 4 deletions android/measure-android-gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mavenPublishing {
}

kotlin {
jvmToolchain(17)
jvmToolchain(11)
}

extensions.configure<SpotlessExtension>("spotless") {
Expand Down Expand Up @@ -113,7 +113,7 @@ fun configureSpotlessKotlin(spotlessExtension: SpotlessExtension) {
}

dependencies {
compileOnly(libs.agp)
compileOnly(libs.agp741)
compileOnly(libs.asm.util)
compileOnly(libs.asm.commons)

Expand All @@ -132,7 +132,7 @@ dependencies {
testImplementation(libs.squareup.okhttp.mockwebserver)
testImplementation(libs.asm.util)
testImplementation(libs.asm.commons)
testImplementation(libs.agp)
testImplementation(libs.agp741)
testImplementation(libs.mockitokotlin2.mockito.kotlin)
testImplementationAar(libs.measure.android)

Expand All @@ -145,7 +145,10 @@ dependencies {
}

tasks.withType<Test>().configureEach {
if (this.name.equals("functionalTest")) {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
if (this.name == "functionalTest") {
useJUnitPlatform()
}
}
Loading