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

s3rius

11/08/2023, 5:02 PM
Hey there, so, Compose Compiler 1.5.4 brought new toys to play with: • a compiler flag to enable "strong skipping" • a compiler flag to provide a configuration file for types to be considered stable. So I tried to use these two features in my KMP playground project, but one of these compiler options produces an error. My configuration is basically this:
Copy code
compose {
    // Force use of Androidx compiler for KMP project as described in <https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md>
    kotlinCompilerPlugin = "androidx.compose.compiler:compiler:1.5.4" // Jetbrains doesn't have 1.5.4 published yet
    kotlinCompilerPluginArgs.addAll(
        "reportsDestination=$buildDir", // works (old)
        "metricsDestination=$buildDir", // works (old)
        "experimentalStrongSkipping=true", // works (new)
        "stabilityConfigurationPath=${layout.projectDirectory}/composeStabilityRules.txt" // doesn't work!
    )
}
I can see that the strongSkipping flag works but building the project with the
stabilityConfigurationPath
flag produces
Unsupported plugin option: androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=/.../composeStabilityRules.txt
. There isn't any documentation yet; I retrieved the name from the linked patch set and compared it to the other flags that are defined a few lines above this one. Any ideas what's going on?
s

s3rius

11/08/2023, 6:38 PM
Awesome, thanks.
3 Views