2024-02-04 15:49:49 +00:00
|
|
|
plugins {
|
2024-02-04 16:04:35 +00:00
|
|
|
idea
|
|
|
|
`java-library`
|
2024-02-04 15:49:49 +00:00
|
|
|
id("java")
|
2024-02-04 17:16:44 +00:00
|
|
|
id("org.pkl-lang") version("0.25.1")
|
2024-02-04 15:49:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "nl.mziesel"
|
|
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
testImplementation(platform("org.junit:junit-bom:5.9.1"))
|
|
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
2024-02-04 16:04:35 +00:00
|
|
|
implementation("org.pkl-lang:pkl-config-java:0.25.1")
|
2024-02-04 15:49:49 +00:00
|
|
|
}
|
|
|
|
|
2024-02-04 17:16:44 +00:00
|
|
|
pkl {
|
|
|
|
javaCodeGenerators {
|
|
|
|
register("configClasses") {
|
|
|
|
sourceModules.set(files("src/main/resources/JmonitConfigTemplate.pkl"))
|
|
|
|
generateJavadoc.set(true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
evaluators {
|
|
|
|
// Create an evaluator that evaluates the application's runtime configuration.
|
|
|
|
// This creates an equally named task called "testPklConfig".
|
|
|
|
//
|
|
|
|
// This task is registered as a dependency to `check`, so that Pkl modules are checked for
|
|
|
|
// correctness as part of a project's tests.
|
|
|
|
register("testPklConfig") {
|
|
|
|
sourceModules.set(files("src/main/resources/JmonitConfig.pkl"))
|
|
|
|
modulePath.from(sourceSets.main.get().runtimeClasspath)
|
|
|
|
outputFile.set(file("${layout.buildDirectory.get()}/testPklConfig/config"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-04 15:49:49 +00:00
|
|
|
tasks.test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|