Files
pkl/pkl-codegen-kotlin/pkl-codegen-kotlin.gradle.kts
Sam Gammon 1e50200969 Use Gradle typed project accessors
This change activates the `TYPESAFE_PROJECT_ACCESSORS` feature
preview in Gradle, and switches to such accessors instead of
string-based project references, where possible

Relates-To: apple/pkl#204
Signed-off-by: Sam Gammon <sam@elide.ventures>
2024-02-21 11:36:02 +00:00

41 lines
1.0 KiB
Kotlin

plugins {
pklAllProjects
pklKotlinLibrary
pklPublishLibrary
}
publishing {
publications {
named<MavenPublication>("library") {
pom {
url.set("https://github.com/apple/pkl/tree/main/pkl-codegen-kotlin")
description.set("""
Kotlin source code generator that generates corresponding Kotlin classes for Pkl classes,
simplifying consumption of Pkl configuration as statically typed Kotlin objects.
""".trimIndent())
}
}
}
}
tasks.jar {
manifest {
attributes += mapOf("Main-Class" to "org.pkl.codegen.kotlin.Main")
}
}
dependencies {
implementation(projects.pklCommons)
api(projects.pklCommonsCli)
api(projects.pklCore)
implementation(libs.kotlinPoet)
implementation(libs.kotlinReflect)
testImplementation(projects.pklConfigKotlin)
testImplementation(projects.pklCommonsTest)
testImplementation(libs.kotlinCompilerEmbeddable)
testRuntimeOnly(libs.kotlinScriptingCompilerEmbeddable)
testRuntimeOnly(libs.kotlinScriptUtil)
}