import io.gitlab.jfronny.scripts.earlyAfterEvaluate plugins { id("jf.earlyafterevaluate") `java-library` } val manifoldVersion by extra("2023.1.10") dependencies { implementation("systems.manifold:manifold-props-rt:$manifoldVersion") testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-ext:$manifoldVersion")!!) testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-props:$manifoldVersion")!!) } 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")) } } }