From 04def4da0bce710780cc393970c4c1335a18d738 Mon Sep 17 00:00:00 2001 From: michalharakal Date: Sun, 20 Sep 2026 14:18:09 +0200 Subject: [PATCH] build: pin JVM target 21 for modules on sk.ainet.multiplatform 1.1.0 Convention plugin 1.1.0 introduces a jvmTarget option defaulting to JVM 17. asr-domain, llm-core and transformer-core were therefore compiled for 17 while the engine artifacts and the rest of the build are 21, and inline calls into the engine no longer compile ("Cannot inline bytecode built with JVM target 21 into ... 17"). develop has been red since the 1.0.0 -> 1.1.0 plugin bump. --- asr-domain/build.gradle.kts | 3 +++ llm-core/build.gradle.kts | 3 +++ transformer-core/build.gradle.kts | 3 +++ 3 files changed, 9 insertions(+) diff --git a/asr-domain/build.gradle.kts b/asr-domain/build.gradle.kts index 42796d94..fe712226 100644 --- a/asr-domain/build.gradle.kts +++ b/asr-domain/build.gradle.kts @@ -17,5 +17,8 @@ plugins { // kotlin-test in commonTest is added automatically (SkainetMultiplatformExtension's // kotlinTestInCommonTest default). skainet { + // sk.ainet.multiplatform 1.1.0 defaults the JVM target to 17; the engine artifacts and the rest of + // this build are JVM 21, and inlining across the two fails to compile. + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 namespace = "sk.ainet.asr.domain" } diff --git a/llm-core/build.gradle.kts b/llm-core/build.gradle.kts index 30b80e70..bce847c8 100644 --- a/llm-core/build.gradle.kts +++ b/llm-core/build.gradle.kts @@ -12,6 +12,9 @@ plugins { // declared manually below instead, alongside this module's own already-manual source-set // hierarchy (kotlin.mpp.applyDefaultHierarchyTemplate=false, also in gradle.properties). skainet { + // sk.ainet.multiplatform 1.1.0 defaults the JVM target to 17; the engine artifacts and the rest of + // this build are JVM 21, and inlining across the two fails to compile. + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 namespace = "sk.ainet.apps.llm" // sk.ainet.multiplatform defaults explicitApi to true; this module has a handful of // declarations (DecoderGgufWeightLoader.kt's GGUF key-naming helpers) missing visibility diff --git a/transformer-core/build.gradle.kts b/transformer-core/build.gradle.kts index c9820773..5d74edd9 100644 --- a/transformer-core/build.gradle.kts +++ b/transformer-core/build.gradle.kts @@ -15,6 +15,9 @@ plugins { // Targets: gradle.properties (skainet.targets=jvm,js,wasmJs,wasmWasi,apple,linux,androidNative -- // the full default plus androidNative, since this module needs both androidNativeArm32/64). skainet { + // sk.ainet.multiplatform 1.1.0 defaults the JVM target to 17; the engine artifacts and the rest of + // this build are JVM 21, and inlining across the two fails to compile. + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21 namespace = "sk.ainet.lang.nn" }