From 9b1e17337373f0e6364e30a9fcae84a5c62275d9 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Mon, 20 Feb 2023 01:03:35 -0800 Subject: [PATCH] Update AGP --- app/build.gradle.kts | 7 ++----- app/shared/src/main/AndroidManifest.xml | 4 ---- buildSrc/build.gradle.kts | 4 +--- buildSrc/src/main/java/Setup.kt | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 49523c99f..784aec129 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -39,9 +39,10 @@ android { buildFeatures { dataBinding = true + aidl = true } - packagingOptions { + packaging { resources { excludes += "/META-INF/*" excludes += "/META-INF/versions/**" @@ -57,10 +58,6 @@ android { keepDebugSymbols += "**/*.so" } } - - kotlin { - jvmToolchain(17) - } } setupApp() diff --git a/app/shared/src/main/AndroidManifest.xml b/app/shared/src/main/AndroidManifest.xml index 188b4e220..0edea0fff 100644 --- a/app/shared/src/main/AndroidManifest.xml +++ b/app/shared/src/main/AndroidManifest.xml @@ -9,10 +9,6 @@ - ) = configure.execute(it as KotlinJvmOptions) } +private fun BaseExtension.kotlin(configure: Action) = + (this as ExtensionAware).extensions.findByName("kotlin")?.let { + configure.execute(it as KotlinAndroidProjectExtension) + } + private val Project.android: BaseAppModuleExtension get() = extensions["android"] as BaseAppModuleExtension @@ -60,6 +65,10 @@ fun Project.setupCommon() { kotlinOptions { jvmTarget = "17" } + + kotlin { + jvmToolchain(17) + } } } @@ -130,6 +139,10 @@ private fun Project.setupAppCommon() { dependenciesInfo { includeInApk = false } + + buildFeatures { + buildConfig = true + } } android.applicationVariants.all {