Nikita Khlebushkin
02/10/2020, 3:03 PMcompile.dependsOn(something)
, but I don't know what task should I put in the parenthesis (I don't create explicitly any tasks)Fleshgrinder
02/11/2020, 5:55 AMcompileKotlin
Nikita Khlebushkin
02/11/2020, 10:46 AMFleshgrinder
02/11/2020, 10:47 AMtasks.compileKotlin.get().dependsOn(yourTask)
./gradlew [whatever it is you want to hook into, e.g. publish] --console=plain
and it shows you every task it runs and in which order.Nikita Khlebushkin
02/11/2020, 10:53 AMapplyMyPlugin
, but there is no such taskFleshgrinder
02/11/2020, 10:54 AMcompileKotlin
is basically the same (not exactly) as kotlinc File.kt
and with your plugin that would be kotlinc -Xplugin=path/to/your/plugin.jar File.kt
.-Xplugin=
part to the compileKotlin
task.Nikita Khlebushkin
02/11/2020, 11:07 AMFleshgrinder
02/11/2020, 11:35 AM.class
file, so byte code). You need to add your additional definitions to the AST or directly produce byte code. You cannot produce Kotlin files and feed them in because then it is not a compiler plugin.Nikita Khlebushkin
02/11/2020, 1:18 PMClassBuilderInterceptorExtension.registerExtension(project, extension)
ExpressionCodegenExtension.registerExtension(project, extension)
SyntheticResolveExtension.registerExtension(project, extension)
StorageComponentContainerContributor.registerExtension(project, extension)
CompilerConfigurationExtension.registerExtension(project, extension)
PreprocessedVirtualFileFactoryExtension.registerExtension(project, extension)
Now the build is coming through, BUT in 30% only. It seems like the compiler and my plugin are racing each other, and sometimes, when my plugin wins, the generated files are on their places when the compiler is looking for them. Is there anything I can do about flakiness of the builds?