Rey (Kingg22)
12/08/2025, 3:31 AMcomposeCompiler {
reportsDestination.set(layout.buildDirectory.dir("reports/compose_reports"))
metricsDestination.set(layout.buildDirectory.dir("reports/compose_metrics"))
}Anton Prokhorov
12/08/2025, 11:11 AMSorry for the spam! 🎉 amperNo worries! Not a problem whatsoever! Sorry, we have no native DSL for that, however, you can use
settings.kotlin.freeCompilerArgs
to add something like that:
-P plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=<directory>
as a workaroundRey (Kingg22)
12/08/2025, 4:22 PMSorry, we have no native DSL for that, however, you can use
@Anton Prokhorov Hi, I tried, but throws exception always, I check the syntax but looks fine.settings.kotlin.freeCompilerArgs
freeCompilerArgs:
- "-Wextra"
- -P plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=compose_metrics
/home/kingg22/IdeaProjects/vibrion/amper build -m app
00:02.156 INFO Compiling modules: app
00:04.105 INFO :app:compileAndroidDebug Compiling module 'app' for platform 'android'...
Internal error: org.jetbrains.amper.engine.TaskExecutor$TaskExecutionFailed: Task ':app:compileAndroidDebug' failed: org.jetbrains.kotlin.buildtools.api.CompilerArgumentsParseException: Invalid argument: -P plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=compose_metrics
Please check the build logs for the full stacktrace, and if possible file a bug report at https://youtrack.jetbrains.com/newIssue?project=AMPER
Maybe amper plugin or intellij idk, can help with
<https://kotlinlang.org/docs/compiler-reference.html#schema-for-compiler-options
|Schema for compiler options>
A common schema for all compiler options is published underas a JAR artifact. This artifact includes both a code representation and a JSON equivalent of all compiler option descriptions (for non-Kotlin consumers). As well as metadata, such as the version in which each option was introduced or stabilized.org.jetbrains.kotlin:kotlin-compiler-arguments-description
Anton Prokhorov
12/08/2025, 4:32 PMsettings:
kotlin:
freeCompilerArgs:
- "-Wextra"
- -P
- plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=compose_metricsRey (Kingg22)
12/08/2025, 4:36 PMAnton Prokhorov
12/08/2025, 4:44 PMThanks, now works fine amper intensifiesCool! Happy to help
only takes the directory from the root dir projectFollow-up question: could you please elaborate? What do you mean by that? is it that it's impossible to set the directory outside of the project? and how would you expect it could work?
Rey (Kingg22)
12/08/2025, 4:47 PMAnton Prokhorov
12/08/2025, 4:50 PMbuild?Rey (Kingg22)
12/08/2025, 4:57 PM-P plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=compose_metrics it writes to <project-root>/compose_metrics.
What I meant is that I expected it maybe to resolve relative to build/ like Gradle does with layout.buildDirectory, so maybe something like: -P plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=build/compose_metrics
It works fine; nothing stops me from using build/compose_metrics, I was just clarifying the behavior.
I thought maybe Amper would have a default like Gradle, but it's cool as is.
I'm sorry if I wasn't clear, English isn't my native language.Rey (Kingg22)
12/08/2025, 4:59 PMAnton Prokhorov
12/08/2025, 5:03 PMbuild dir though)
but at least now we have such use case