Files
pkl/pkl-server/pkl-server.gradle.kts
Daniel Chao d81a12352c 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
2024-06-03 17:08:30 -07:00

39 lines
927 B
Kotlin

plugins {
pklAllProjects
pklJavaLibrary
pklKotlinLibrary
pklNativeBuild
}
dependencies {
implementation(projects.pklCore)
implementation(libs.msgpack)
implementation(libs.truffleApi)
implementation(libs.antlrRuntime)
testImplementation(projects.pklCommonsTest)
}
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)
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)
}