Skip to content

Commit

Permalink
androidComponents
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Smithy-x committed Mar 14, 2024
1 parent 4da0051 commit 27dd963
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompileTool

plugins {
id("kotlin-android")
alias(libs.plugins.gms.google.services)
Expand Down Expand Up @@ -58,7 +60,6 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = false
setFlavorDimensions(flavorDimensions)
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand All @@ -85,6 +86,17 @@ android {
composeOptions {
kotlinCompilerExtensionVersion = "1.5.10"
}

androidComponents {
onVariants(selector().all()) { variant ->
afterEvaluate {
val capName = variant.name.capitalize()
tasks.getByName("ksp${capName}Kotlin") {
(this as AbstractKotlinCompileTool<*>).setSource(tasks.getByName("compile${capName}Aidl").outputs)
}
}
}
}
}

dependencies {
Expand Down

0 comments on commit 27dd963

Please sign in to comment.