li'lfluf
10/23/2026, 3:34 PMYoussef Shoaib [MOD]
10/23/2026, 3:51 PMKotlinCompilerPluginSupportPlugin lets you pass some `SubpluginOption`s. You can then read those in your CommandLineProcessor, placing them in the CompilerConfiguration, and finally you should pass the CompilerConfiguration to your IR extensionli'lfluf
10/23/2026, 4:31 PMYoussef Shoaib [MOD]
10/23/2026, 4:34 PMli'lfluf
10/23/2026, 5:03 PMtrace {} anywhere) that has nearly no overhead. Which means that in the IR stage the plugin must know how to construct the tag, the logging message, etc. For some things I can use plugin options, or with Java I can use agressive inlining for static things with R8 if I really want no overhead. But the latter is tricky and rather fragile. I'm just thinking, it would really make sense to have this configuration as function defined somewhere in Gradle. For example, I could say something like this myCoolLogging {
tagSelector = { packageName ->
when {
packageName.startsWith(...) -> "App/Service"
else -> "App"
}
}
}Youssef Shoaib [MOD]
10/23/2026, 5:06 PMmyCoolLogging {
tagSelector = "my.package.myTagSelector"
}
Then in user code:
package my.package
fun myTagSelector(packageName: String) = when {
packageName.startsWith(...) -> "App/Service"
else -> "App"
}
And have your IR wire a call to itYoussef Shoaib [MOD]
10/23/2026, 5:09 PMpackage statements from their files), run the lambda they provide on it, and pass that map as a compiler optionli'lfluf
10/23/2026, 5:09 PMIrTransformer?Youssef Shoaib [MOD]
10/23/2026, 5:12 PMli'lfluf
10/23/2026, 5:21 PM