diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 38f517ee2c..e4d7d3d2b9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] android = "4.1.1.4" -androidGradlePlugin = "9.2.1" +androidGradlePlugin = "9.3.2" asm = "9.10.1" checkerQual = "4.2.2" coroutines = "1.11.0" diff --git a/wire-gradle-plugin/build.gradle.kts b/wire-gradle-plugin/build.gradle.kts index e0842a87fe..46cf541e0f 100644 --- a/wire-gradle-plugin/build.gradle.kts +++ b/wire-gradle-plugin/build.gradle.kts @@ -1,3 +1,4 @@ +import org.gradle.api.attributes.java.TargetJvmVersion import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile @@ -111,3 +112,11 @@ tasks.withType().configureEach { ) } } + +// AGP 9.3+ publishes its artifacts with Java 17 metadata. AGP is compileOnly here and this module +// keeps Java 11 bytecode for its consumers, so only relax the resolution attribute. +configurations.named("compileClasspath") { + attributes { + attribute(TargetJvmVersion.TARGET_JVM_VERSION_ATTRIBUTE, 17) + } +}