Chak Chi Sio
05/23/2024, 8:02 PMusingComposeCompiler
don't have a configured value....
fun Project.configure() {
if (tasks.findByName(TASK_NAME) != null) {
val taskA = tasks.named(TASK_NAME, CheckComposeAllowListTask::class.java)
val taskB = tasks.withType(KotlinCompile::class.java)
val booleanOutput: Property<Boolean> = objects.property(Boolean::class.java)
taskA.configure {
usingComposeCompiler.set(booleanOutput)
}
taskB.configureEach {
doFirst {
val usingComposeCompiler = kotlinOptions.freeCompilerArgs.any { arg ->
arg.contains("androidx.compose.compiler")
}
booleanOutput.set(usingComposeCompiler)
}
finalizedBy(taskA)
}
}
}
what i am trying to do is that, i configure TaskA with a property that will later be set from TaskB.doFirst.....i am actually not sure if this is the right way to approach it.Vampire
05/23/2024, 10:12 PMChak Chi Sio
05/23/2024, 10:14 PMVampire
05/23/2024, 10:17 PMVampire
05/23/2024, 10:17 PMVampire
05/23/2024, 10:18 PM