https://kotlinlang.org logo
#compose
Title
# compose
p

Pierfrancesco Gulinelli

03/29/2020, 11:29 AM
I'm adding compose to a big project with multiple modules (AS 4.1 canary ). I have
Copy code
buildFeatures {
    compose true
}
composeOptions {
    kotlinCompilerVersion "1.3.61-dev-withExperimentalGoogleExtensions-20200129"
    kotlinCompilerExtensionVersion "0.1.0-dev07"
}
on every module. But when i try to run the project, it appears
Execution failed for task ':app:prepareDebugKotlinCompileTask'.
> org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.setUseIR(Z)V
a

Adrian Blanco

03/29/2020, 12:26 PM
If any module uses both kapt and compose, compiling will fail and complain about IR.
p

Pierfrancesco Gulinelli

03/29/2020, 12:29 PM
yes, but i knew it worked with kotlinCompilerVersion and kotlinCompilerExtensionVersion
a

Adrian Blanco

03/29/2020, 1:10 PM
Afaik from when I tried last, adding those two dependencies compiles but is not enough to use compose, adding
compose true
is required but will cause compilation to fail if it conflicts with kapt
p

Pierfrancesco Gulinelli

03/29/2020, 2:22 PM
ok, thank you. I hoped they had fixed it
l

Leland Richardson [G]

04/03/2020, 2:56 PM
this should get fixed once we finish our rebase with kotlin upstream (though i’m not 100% sure), but that is taking a bit longer than we had planned.
3 Views