leandro
03/05/2021, 3:33 PMallprojects {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile).configureEach { task ->
task.kotlinOptions {
}
}
}
but this errors with
Execution failed for task ':mymodule:runCommonizer'.
> Could not create task ':mymodule:compileKotlinIosArm64'.
> Cannot query the value of task ':mymodule:compileKotlinIosArm64' property 'compilation' because it has no value available.
note mymodule
has the multiplatform
plugin appliedBig Chungus
03/05/2021, 3:49 PMleandro
03/05/2021, 3:57 PM> Could not create task ':store:compileDebugKotlinAndroid'.
> Project#afterEvaluate(Closure) on project ':store' cannot be executed in the current context.
leandro
03/05/2021, 3:58 PMtasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile).configureEach { task ->
afterEvaluate {
task.kotlinOptions {
}
}
}
Big Chungus
03/05/2021, 3:58 PMBig Chungus
03/05/2021, 3:58 PMleandro
03/05/2021, 3:59 PMafterEvaluate {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile).configureEach { task ->
task.kotlinOptions {
}
}
}
leandro
03/05/2021, 4:00 PMCannot query the value of task ':mymodule:compileIosMainKotlinMetadata' property 'compilation' because it has no value available.
Big Chungus
03/05/2021, 4:04 PMallprojects {
afterEvaluate {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile> { // this == task
kotlinOptions {
}
}
}
}
Big Chungus
03/05/2021, 4:08 PMleandro
03/05/2021, 4:10 PM<
and >
to parenthesis because I’m editing a .groovy file, not kotlin. But still, same error 😞leandro
03/05/2021, 4:10 PMallprojects {
afterEvaluate {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) { // this == task
kotlinOptions {
}
}
}
}
Big Chungus
03/05/2021, 4:15 PMBig Chungus
03/05/2021, 4:16 PMBig Chungus
03/05/2021, 4:17 PMleandro
03/05/2021, 4:27 PMtasks.KotlinCompile
instead of dsl.KotlinCompile
Big Chungus
03/05/2021, 4:37 PMleandro
03/05/2021, 5:09 PMallprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { task ->
task.kotlinOptions {
}
}
}