Fix missing resources in native pkldoc, and disable test mode (#1175)

This fixes two issues:

1. Test mode is enabled in pkldoc without the ability to turn it off
2. Native pkldoc is missing required resources

This also adds tests for both `jpkldoc` and `pkldoc`.
This commit is contained in:
Daniel Chao
2025-08-21 06:44:13 -07:00
committed by GitHub
parent ae5f02b285
commit d9db939bdc
13 changed files with 577 additions and 186 deletions

View File

@@ -66,6 +66,31 @@ publishing {
}
}
val testNativeExecutable by
tasks.registering(Test::class) {
inputs.dir("src/test/files/DocGeneratorTest/input")
outputs.dir("src/test/files/DocGeneratorTest/output")
systemProperty("org.pkl.doc.NativeExecutableTest", "true")
include(listOf("**/NativeExecutableTest.class"))
}
val testJavaExecutable by
tasks.registering(Test::class) {
dependsOn(tasks.javaExecutable)
inputs.dir("src/test/files/DocGeneratorTest/input")
outputs.dir("src/test/files/DocGeneratorTest/output")
systemProperty("org.pkl.doc.JavaExecutableTest", "true")
include(listOf("**/JavaExecutableTest.class"))
}
tasks.check { dependsOn(testJavaExecutable) }
tasks.testNative { dependsOn(testNativeExecutable) }
tasks.withType<NativeImageBuild> { extraNativeImageArgs.add("-H:IncludeResources=org/pkl/doc/.*") }
tasks.jar { manifest { attributes += mapOf("Main-Class" to "org.pkl.doc.Main") } }
htmlValidator { sources = files("src/test/files/DocGeneratorTest/output") }
tasks.validateHtml { mustRunAfter(testJavaExecutable) }