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

itnoles

02/28/2024, 5:26 AM
https://chrisbanes.me/posts/composable-metrics/ can this be run on compose multiplatform?
j

jw

02/28/2024, 5:32 AM
Yes, the compiler is exactly the same
i

itnoles

02/28/2024, 5:34 AM
oh good, I am going to try it when I get a chance.
s

s3rius

02/29/2024, 8:33 PM
For KMP you can configure it like this
Copy code
compose {
    val buildDir = layout.buildDirectory.get().asFile.absolutePath

    // <https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md>
    kotlinCompilerPluginArgs.addAll(
        "reportsDestination=$buildDir",
        "metricsDestination=$buildDir"
    )
}