mirror of
https://github.com/apple/pkl.git
synced 2026-04-21 16:01:31 +02:00
Initial commit
This commit is contained in:
55
pkl-executor/pkl-executor.gradle.kts
Normal file
55
pkl-executor/pkl-executor.gradle.kts
Normal file
@@ -0,0 +1,55 @@
|
||||
plugins {
|
||||
pklAllProjects
|
||||
pklJavaLibrary
|
||||
pklPublishLibrary
|
||||
pklKotlinTest
|
||||
}
|
||||
|
||||
val pklDistribution: Configuration by configurations.creating
|
||||
|
||||
// Because pkl-executor doesn't depend on other Pkl modules
|
||||
// (nor has overlapping dependencies that could cause a version conflict),
|
||||
// clients are free to use different versions of pkl-executor and (say) pkl-config-java-all.
|
||||
// (Pkl distributions used by EmbeddedExecutor are isolated via class loaders.)
|
||||
dependencies {
|
||||
pklDistribution(project(":pkl-config-java", "fatJar"))
|
||||
|
||||
implementation(libs.slf4jApi)
|
||||
|
||||
testImplementation(project(":pkl-commons-test"))
|
||||
testImplementation(project(":pkl-core"))
|
||||
testImplementation(libs.slf4jSimple)
|
||||
}
|
||||
|
||||
// TODO why is this needed? Without this, we get error:
|
||||
// `Entry org/pkl/executor/EmbeddedExecutor.java is a duplicate but no duplicate handling strategy has been set.`
|
||||
// However, we do not have multiple of these Java files.
|
||||
tasks.named<Jar>("sourcesJar") {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
named<MavenPublication>("library") {
|
||||
pom {
|
||||
url.set("https://github.com/apple/pkl/tree/main/pkl-executor")
|
||||
description.set("""
|
||||
Library for executing Pkl code in a sandboxed environment.
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDir("src/main/java")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
// used by EmbeddedExecutorTest
|
||||
dependsOn(pklDistribution)
|
||||
}
|
||||
Reference in New Issue
Block a user