Skip to content

Commit

Permalink
Rollback disabling unpacked klibs for Kotlin 2.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
TadeasKriz committed Nov 26, 2024
1 parent 93bc432 commit 635543e
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion SKIE/acceptance-tests
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ multiCompileRuntime {
klibPath = { kotlinVersion, target ->
if (target.platformType == KotlinPlatformType.jvm) {
"build/libs/configuration-annotations-${kotlinVersion}-${target.name.lowercase()}-${version}.jar"
} else if (kotlinVersion >= MultiCompileTarget.kotlin_2_1_0) {
"build/libs/configuration-annotations-${kotlinVersion}-${target.name}Main-${version}.klib"
} else {
val includeKlibExtension = true // kotlinVersion < MultiCompileTarget.kotlin_2_1_0
"build/classes/kotlin/${target.name}/main/klib/configuration-annotations-${kotlinVersion}" + if (includeKlibExtension) ".klib" else ""
"build/classes/kotlin/${target.name}/main/klib/configuration-annotations-${kotlinVersion}.klib"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m -XX:+UseParallelGC

kotlin.internal.compiler.arguments.log.level=info

kotlin.internal.klibs.non-packed=false
1 change: 0 additions & 1 deletion SKIE/runtime/kotlin/impl/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx1g -XX:MaxMetaspaceSize=500m -XX:+UseParallelGC

kotlin.internal.klibs.non-packed=false
7 changes: 5 additions & 2 deletions SKIE/runtime/kotlin/runtime-kotlin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ multiCompileRuntime {
isPublishable = true
targets.set(MultiCompileTarget.allDarwin)
klibPath = { kotlinVersion, target ->
val includeKlibExtension = true // kotlinVersion < MultiCompileTarget.kotlin_2_1_0
"build/classes/kotlin/${target.name}/main/klib/runtime-kotlin-${kotlinVersion}" + if (includeKlibExtension) ".klib" else ""
if (kotlinVersion >= MultiCompileTarget.kotlin_2_1_0) {
"build/libs/runtime-kotlin-${kotlinVersion}-${target.name}Main-${version}.klib"
} else {
"build/classes/kotlin/${target.name}/main/klib/runtime-kotlin-${kotlinVersion}.klib"
}
}
dependencies = { _ ->
"implementation(libs.kotlinx.coroutines.core)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package co.touchlab.skie.buildsetup.plugins

import co.touchlab.skie.buildsetup.plugins.MultiCompileTarget.Companion.kotlin_1_9_0
import co.touchlab.skie.buildsetup.plugins.MultiCompileTarget.Companion.kotlin_2_1_0
import co.touchlab.skie.buildsetup.tasks.BuildNestedGradle
import co.touchlab.skie.gradle.KotlinCompilerVersion
import co.touchlab.skie.gradle.KotlinToolingVersion
Expand Down Expand Up @@ -56,7 +57,7 @@ class SkieMultiCompileRuntime: Plugin<Project> {
val buildTask = registerBuildTask(
name = kotlinToolingVersion.name.toString(),
supportedTargetsWithDeclarations = supportedTargetsWithDeclarations,
kotlinVersion = kotlinToolingVersion.primaryVersion,
kotlinVersion = kotlinToolingVersion.name,
copyTask = copyTask,
)

Expand Down Expand Up @@ -210,9 +211,14 @@ class SkieMultiCompileRuntime: Plugin<Project> {
"${target.name}LegacyJar",
)
}
KotlinPlatformType.native, KotlinPlatformType.wasm -> listOf("${target.name}MainKlibrary")

KotlinPlatformType.native, KotlinPlatformType.wasm -> if (kotlinVersion >= kotlin_2_1_0) {
listOf("${target.name}Klib")
} else {
listOf("${target.name}MainKlibrary")
}
}
}
},
)
}
}
Expand Down
1 change: 0 additions & 1 deletion common-gradle/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ kotlinNativeCompilerEmbeddableFromHome=true

kotlin.internal.compiler.arguments.log.level=info

kotlin.internal.klibs.non-packed=false

0 comments on commit 635543e

Please sign in to comment.