From b443d6f03843562285302b9513d13e62be9b2994 Mon Sep 17 00:00:00 2001 From: JFronny Date: Thu, 24 Nov 2022 19:25:15 +0100 Subject: [PATCH] Plz --- .../src/main/kotlin/jf.manifold.gradle.kts | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/convention/src/main/kotlin/jf.manifold.gradle.kts b/convention/src/main/kotlin/jf.manifold.gradle.kts index 47f6d88..8ab41e1 100644 --- a/convention/src/main/kotlin/jf.manifold.gradle.kts +++ b/convention/src/main/kotlin/jf.manifold.gradle.kts @@ -1,4 +1,7 @@ +import io.gitlab.jfronny.scripts.earlyAfterEvaluate + plugins { + id("jf.earlyafterevaluate") `java-library` } @@ -11,12 +14,14 @@ dependencies { testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-props:$manifoldVersion")!!) } -if (sourceSets.main.get().allJava.files.any {it.name == "module-info.java"}) { - tasks.withType { - options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap", "--module-path", classpath.asPath)) +earlyAfterEvaluate { + if (sourceSets.main.get().allJava.files.any {it.name == "module-info.java"}) { + tasks.withType { + options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap", "--module-path", classpath.asPath)) + } + } else { + tasks.withType { + options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap")) + } } -} else { - tasks.withType { - options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap")) - } -} \ No newline at end of file +}