mirror of
https://github.com/apple/pkl.git
synced 2026-07-13 08:33:04 +02:00
Improve configuration and tests for native-image (#509)
* Don't expose JDK internal classes; instead solve msgpack issue with `--initialize-at-run-time`. * Use quick build mode for non-release builds: 40% faster compilation, 20% smaller executable. * Remove options that were commented out. * Also run ServerTest against native executable
This commit is contained in:
@@ -2,6 +2,7 @@ plugins {
|
||||
pklAllProjects
|
||||
pklJavaLibrary
|
||||
pklKotlinLibrary
|
||||
pklNativeBuild
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -14,6 +15,24 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
inputs.dir("src/test/files/SnippetTests/input").withPropertyName("snippetTestsInput").withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
inputs.dir("src/test/files/SnippetTests/output").withPropertyName("snippetTestsOutput").withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
inputs.dir("src/test/files/SnippetTests/input")
|
||||
.withPropertyName("snippetTestsInput")
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
inputs.dir("src/test/files/SnippetTests/output")
|
||||
.withPropertyName("snippetTestsOutput")
|
||||
.withPathSensitivity(PathSensitivity.RELATIVE)
|
||||
exclude("**/NativeServerTest.*")
|
||||
}
|
||||
|
||||
val nativeTest by tasks.registering(Test::class) {
|
||||
dependsOn(":pkl-cli:assembleNative")
|
||||
testClassesDirs = files(tasks.test.get().testClassesDirs)
|
||||
classpath = tasks.test.get().classpath
|
||||
include("**/NativeServerTest.*")
|
||||
}
|
||||
|
||||
val testNative by tasks.existing
|
||||
testNative {
|
||||
dependsOn(nativeTest)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user