From c4e28d2cb737e097dfefe507f45449c9b69bc468 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 17 Aug 2023 14:06:15 -0400 Subject: [PATCH] Update AGP to v8.6.0 --- build.gradle | 12 ------------ glean-core/android-native/build.gradle | 5 +++++ glean-core/android/build.gradle | 4 ++++ gradle.properties | 1 - gradle/libs.versions.toml | 2 +- samples/android/app/build.gradle | 4 ++++ 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index b314d89308..184c868244 100644 --- a/build.gradle +++ b/build.gradle @@ -117,22 +117,10 @@ ext.rustTargets += ext.nativeRustTarget subprojects { apply plugin: 'maven-publish' - // Kotlin settings applicable to all modules. afterEvaluate { - if (it.hasProperty('android')) { - android { - // This shouldn't be needed anymore with AGP 8.1.0+ - // https://kotlinlang.org/docs/gradle-configure-project.html#gradle-java-toolchains-support - compileOptions { - sourceCompatibility rootProject.ext.build.jvmTargetCompatibility - targetCompatibility rootProject.ext.build.jvmTargetCompatibility - } - } - } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions.allWarningsAsErrors = true - kotlin.jvmToolchain(rootProject.ext.build.jvmTargetCompatibility) } } diff --git a/glean-core/android-native/build.gradle b/glean-core/android-native/build.gradle index 48769651f6..702707d8e1 100644 --- a/glean-core/android-native/build.gradle +++ b/glean-core/android-native/build.gradle @@ -8,8 +8,13 @@ import groovy.json.JsonOutput apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' apply plugin: 'org.mozilla.rust-android-gradle.rust-android' +kotlin { + jvmToolchain(rootProject.ext.build.jvmTargetCompatibility) +} + android { namespace "mozilla.telemetry.glean_native" diff --git a/glean-core/android/build.gradle b/glean-core/android/build.gradle index 3568e40b3f..1bd59612ca 100644 --- a/glean-core/android/build.gradle +++ b/glean-core/android/build.gradle @@ -28,6 +28,10 @@ File GLEAN_PING_SCHEMA_PATH = file("$rootDir/glean.1.schema.json") ext.allowGleanInternal = true ext.gleanNamespace = "mozilla.telemetry.glean" +kotlin { + jvmToolchain(rootProject.ext.build.jvmTargetCompatibility) +} + android { compileSdkVersion rootProject.ext.build.compileSdkVersion namespace "mozilla.telemetry.glean" diff --git a/gradle.properties b/gradle.properties index c62594c682..96c34d118a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,4 +23,3 @@ libLicense=MPL-2.0 libLicenseUrl=https://www.mozilla.org/en-US/MPL/2.0/ android.useAndroidX=true -android.experimental.lint.version=8.3.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5ca9dd3c6b..ac1042680f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ [versions] # AGP -android-plugin = "8.0.2" +android-plugin = "8.6.0" # Kotlin kotlin-compiler = "1.9.24" diff --git a/samples/android/app/build.gradle b/samples/android/app/build.gradle index 06217896b6..683d0791a6 100644 --- a/samples/android/app/build.gradle +++ b/samples/android/app/build.gradle @@ -10,6 +10,10 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlinx-serialization' +kotlin { + jvmToolchain(rootProject.ext.build.jvmTargetCompatibility) +} + android { namespace "org.mozilla.samples.gleancore" compileSdkVersion rootProject.ext.build.compileSdkVersion