Closed StefanOltmann closed 2 months ago
Okay, downgrading to 1.4.3 it doesn't work with Multiplatform at all. If I specify it in my android module, this does not help, too.
Please make it compatible with Multiplatform
Thanks for reporting. Will definitely add a support will update here
Actually currently it's android specific only
For now You can use the CLI version. To make compose compiler metrics work with compose multiplatform you need to add something like this to your root build.gradle.kts file:
allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile::class.java).configureEach {
kotlinOptions {
// Trigger this with:
// ./gradlew assembleRelease -PenableMultiModuleComposeReports=true --rerun-tasks
if (project.findProperty("enableMultiModuleComposeReports") == "true") {
freeCompilerArgs += listOf("-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + rootProject.buildDir.absolutePath + "/compose_metrics/")
freeCompilerArgs += listOf("-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + rootProject.buildDir.absolutePath + "/compose_metrics/")
}
}
}
}
Then you can use CLI version pointing input path to "<YOUR_PROJECT_PATH>\build\compose_metrics
Thank you! That worked, I got my report. Awesome!
So it looks like Compose Multiplatform support out of the box shouldn't be too far away. :)
@mikolajefento thanks for the quick remedy.
@StefanOltmann yep, it's just that we'll need to create a plugin variant for multiplatform and I guess we'll be able to do it.
Hi @PatilShreyas I've initial implementation here #110 that addresses this issue and can make the plugin work with compose multiplatform, I need to do some more testing. but take a look at the PR and spot any potential issues or something that can be improved, I'm waiting for your review
Fixed and released in v1.4.0
. Thanks @mr3y-the-programmer for the contribution
I tried to apply it to Compose Multiplatform 1.5.0-beta02 and got this: