net.twisterrob.gradle
net.twisterrob.gradle copied to clipboard
Use kotlin-dsl everywhere
trafficstars
Based on https://github.com/liutikas/gradle-best-practices/issues/1#issuecomment-1256260998
- Double-check this works if the consumer doesn't use the plugin by checking bytecode with/out the dsl plugin.
- remove
add("compileOnly", deps.kotlin.dsl)hack - apply plugin to all modules
- fix compilation
Careful, KotlinDslCompilerPlugins hardcodes Kotlin 1.4.
(1): there's barely any difference in compiled code, kotlin-dsl just lets Kotlin use nice receiver syntax, but still compiles to Action anonymous inner classes.
(Diff: line numbers are different because I copy-pasted the relevant function, didn't change the plugin.)
PublishingPluginKt-setupLinks-java-library.jad.txt
PublishingPluginKt-setupLinks-kotlin-dsl.jad.txt
