diff --git a/convention/src/main/kotlin/jf.manifold.gradle.kts b/convention/src/main/kotlin/jf.manifold.gradle.kts new file mode 100644 index 0000000..47f6d88 --- /dev/null +++ b/convention/src/main/kotlin/jf.manifold.gradle.kts @@ -0,0 +1,22 @@ +plugins { + `java-library` +} + +val manifoldVersion by extra("2022.1.27") + +dependencies { + implementation("systems.manifold:manifold-props-rt:$manifoldVersion") + + testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-ext:$manifoldVersion")!!) + 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)) + } +} else { + tasks.withType { + options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap")) + } +} \ No newline at end of file