mirror of
https://github.com/apple/pkl.git
synced 2026-04-25 01:38:34 +02:00
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:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user