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

Colton Idle

02/07/2021, 1:39 AM
This compose doc page has this line, but this setup doc does not. Which doc is right?
Copy code
freeCompilerArgs += ["-Xallow-jvm-ir-dependencies"]
a

Albert Chang

02/07/2021, 2:47 AM
The former is out of date. Use
useIR = true
now.
v

Val Salamakha

02/07/2021, 3:47 AM
The right is as following:
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
        useIR = true
        freeCompilerArgs += ["-Xallow-jvm-ir-dependencies",
                    
                             "-P",
                             "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
                             ]
    }
}
5 Views