File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616import org.gradle.accessors.dm.LibrariesForLibs
17+ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
18+ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
1719
1820plugins {
1921 id(" pklJavaLibrary" )
@@ -38,3 +40,26 @@ dependencies {
3840tasks.compileKotlin {
3941 enabled = true // disabled by pklJavaLibrary
4042}
43+
44+ tasks.withType<KotlinJvmCompile >().configureEach {
45+ compilerOptions {
46+ // must match the minimum JVM bytecode target for Pkl
47+ jvmTarget = JvmTarget .JVM_17
48+
49+ // enable java parameter names for stronger Kotlin-Java interop and debugging
50+ javaParameters = true
51+
52+ // consider kotlin warnings errors if not otherwise suppressed
53+ allWarningsAsErrors = true
54+
55+ freeCompilerArgs.addAll(
56+ listOf (
57+ // enable strict nullability checking and integration with pkl's own annotations
58+ " -Xjsr305=strict" ,
59+ " -Xjsr305=@org.pkl.core.util.Nullable:strict" ,
60+ " -Xjsr305=@org.pkl.core.util.Nonnull:strict" ,
61+ )
62+ )
63+ }
64+ }
65+
You can’t perform that action at this time.
0 commit comments