Scripts/convention/src/main/kotlin/jf.manifold.gradle.kts

27 lines
846 B
Plaintext
Raw Normal View History

2022-11-24 19:25:15 +01:00
import io.gitlab.jfronny.scripts.earlyAfterEvaluate
2022-11-24 14:38:04 +01:00
plugins {
2023-07-19 19:12:47 +02:00
id("jf.java")
2022-11-24 14:38:04 +01:00
}
2023-06-09 14:21:56 +02:00
val manifoldVersion by extra("2023.1.10")
2022-11-24 14:38:04 +01:00
dependencies {
implementation("systems.manifold:manifold-props-rt:$manifoldVersion")
testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-ext:$manifoldVersion")!!)
testAnnotationProcessor(annotationProcessor("systems.manifold:manifold-props:$manifoldVersion")!!)
}
2022-11-24 19:25:15 +01:00
earlyAfterEvaluate {
if (sourceSets.main.get().allJava.files.any {it.name == "module-info.java"}) {
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap", "--module-path", classpath.asPath))
}
} else {
tasks.withType<JavaCompile> {
options.compilerArgs.addAll(arrayOf("-Xplugin:Manifold no-bootstrap"))
}
2022-11-24 14:38:04 +01:00
}
2022-11-24 19:25:15 +01:00
}