genovich
11/07/2024, 3:06 PMcompileKotlinJvm
task, but not with compileKotlinJs
I'm not sure that I'm adding the plugin to the compile tasks in the correct way as well
tasks.withType<AbstractKotlinCompile<*>> {
dependsOn(compilerPluginConfiguration)
compilerOptions.freeCompilerArgs.add(provider { "-Xplugin=${compilerPluginConfiguration.files.first()}" })
}
I created a separate configuration compilerPluginConfiguration
and trying to pull the plugin jar from it. I chose this naive approach to simplify the prototype, but it seems like a bad idea now. Any suggestion on how to apply a compiler plugin in the correct way?bnorm
11/07/2024, 3:20 PMkotlinCompilerPluginClasspath
. Otherwise the recommendation would be to create a Gradle plugin from which you can also specify any input you need for your plugin in an idiomatic way.genovich
11/07/2024, 3:24 PM