Browse Source

Build: Add option to skip module info compilation

macos/dialog_size
weisj 3 years ago committed by Jannis Weis
parent
commit
c3e88f3156
  1. 4
      buildSrc/src/main/kotlin/ModuleInfoCompilePlugin.kt

4
buildSrc/src/main/kotlin/ModuleInfoCompilePlugin.kt

@ -16,10 +16,10 @@ open class ModuleInfoExtension {
class ModuleInfoCompilePlugin : Plugin<Project> {
override fun apply(target: Project) = target.run {
val infoExtension = target.extensions.create("moduleInfo", ModuleInfoExtension::class.java)
if (project.findProperty("skipModuleInfo") in listOf("", "true")) return@run
val moduleInfoFile = file("src/main/module/module-info.java")
if (moduleInfoFile.exists()) {
val infoExtension = target.extensions.create("moduleInfo", ModuleInfoExtension::class.java)
val compileJava = tasks.named<JavaCompile>("compileJava")
val compileModuleInfoJava by tasks.registering(JavaCompile::class) {
val javaCompile = compileJava.get()

Loading…
Cancel
Save