Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency org.jetbrains.kotlin.multiplatform to v1.9.21 #124

Merged
merged 7 commits into from
Dec 19, 2023
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ plugins {
alias(libs.plugins.mavenPublish) apply false
}

subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask::class.java) {
compilerOptions {
freeCompilerArgs.add("-Xexpect-actual-classes")
}
}
}

allprojects {
repositories {
mavenCentral()
Expand Down Expand Up @@ -70,4 +78,4 @@ allprojects {
tasks.withType<org.jetbrains.dokka.gradle.DokkaMultiModuleTask>().configureEach {
moduleName.set("Kache")
outputDirectory.set(file("$rootDir/docs/api"))
}
}
32 changes: 17 additions & 15 deletions file-kache-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,32 @@ plugins {
}

kotlin {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

jvm {
compilations.configureEach {
kotlinOptions.jvmTarget = "1.8"
}
}

js(IR) {
browser {
testTask {
useKarma {
useChromeHeadless()
}
fun org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl.configureTests() {
testTask {
useMocha {
timeout = "30s"
}
}
}

js {
// Has no FileSystem implementation in Okio
// browser { configureTests() }

nodejs()
nodejs { configureTests() }
}

// Still experimental
// Blocked by coroutines (issue: https://github.com/Kotlin/kotlinx.coroutines/issues/3713),
// Okio (issue: https://github.com/square/okio/issues/1203), and Kotest (depends on coroutines)
// wasm()
// wasmJs()
// wasmWasi()

macosX64()
macosArm64()
Expand Down Expand Up @@ -62,9 +63,10 @@ kotlin {
// androidNativeX86()
// androidNativeX64()

@Suppress("UNUSED_VARIABLE")
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(project(":kache-core"))

Expand All @@ -75,7 +77,7 @@ kotlin {
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))
implementation(libs.kotest.assertions)
Expand All @@ -84,4 +86,4 @@ kotlin {
}
}
}
}
}
31 changes: 19 additions & 12 deletions file-kache-okio-only/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,32 @@ plugins {
}

kotlin {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

jvm {
compilations.configureEach {
kotlinOptions.jvmTarget = "1.8"
}
}

js(IR) {
fun org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl.configureTests() {
testTask {
useMocha {
timeout = "30s"
}
}
}

js {
// Has no FileSystem implementation in Okio
// browser()
// browser { configureTests() }

nodejs()
nodejs { configureTests() }
}

// Still experimental
// Blocked by coroutines (issue: https://github.com/Kotlin/kotlinx.coroutines/issues/3713),
// Okio (issue: https://github.com/square/okio/issues/1203), and Kotest (depends on coroutines)
// wasm()
// wasmJs()
// wasmWasi()

macosX64()
macosArm64()
Expand Down Expand Up @@ -57,9 +63,10 @@ kotlin {
// androidNativeX86()
// androidNativeX64()

@Suppress("UNUSED_VARIABLE")
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(project(":kache"))
api(project(":file-kache-core"))
Expand All @@ -70,7 +77,7 @@ kotlin {
}
}

val commonTest by getting {
commonTest {
dependencies {
implementation(kotlin("test"))

Expand All @@ -82,10 +89,10 @@ kotlin {
}
}

val jsMain by getting {
jsMain {
dependencies {
implementation(libs.okio.nodeFilesystem)
}
}
}
}
}
29 changes: 18 additions & 11 deletions file-kache-okio/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@ plugins {
}

kotlin {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

jvm {
compilations.configureEach {
kotlinOptions.jvmTarget = "1.8"
}
}

js(IR) {
fun org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl.configureTests() {
testTask {
useMocha {
timeout = "30s"
}
}
}

js {
// Has no FileSystem implementation in Okio
// browser()
// browser { configureTests() }

nodejs()
nodejs { configureTests() }
}

// Still experimental
// Blocked by Okio (issue: https://github.com/square/okio/issues/1203)
// wasm()
// wasmJs()
// wasmWasi()

macosX64()
macosArm64()
Expand Down Expand Up @@ -56,9 +62,10 @@ kotlin {
// androidNativeX86()
// androidNativeX64()

@Suppress("UNUSED_VARIABLE")
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
api(project(":file-kache-okio-only"))
api(project(":file-kache"))
Expand All @@ -67,7 +74,7 @@ kotlin {
}
}

val jsMain by getting {
jsMain {
dependencies {
implementation(libs.okio.nodeFilesystem)
}
Expand All @@ -79,4 +86,4 @@ tasks.withType<org.jetbrains.dokka.gradle.DokkaTaskPartial>().configureEach {
dokkaSourceSets.named("commonMain") {
skipEmptyPackages.set(false)
}
}
}
30 changes: 16 additions & 14 deletions file-kache/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,32 @@ plugins {
}

kotlin {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

jvm {
compilations.configureEach {
kotlinOptions.jvmTarget = "1.8"
}
}

js(IR) {
browser {
testTask {
useKarma {
useChromeHeadless()
}
fun org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl.configureTests() {
testTask {
useMocha {
timeout = "30s"
}
}
}

js {
// Has no FileSystem implementation in Okio
// browser { configureTests() }

nodejs()
nodejs { configureTests() }
}

// Still experimental
// Blocked by coroutines (issue: https://github.com/Kotlin/kotlinx.coroutines/issues/3713) and
// Okio (issue: https://github.com/square/okio/issues/1203)
// wasm()
// wasmJs()
// wasmWasi()

macosX64()
macosArm64()
Expand Down Expand Up @@ -62,9 +63,10 @@ kotlin {
// androidNativeX86()
// androidNativeX64()

@Suppress("UNUSED_VARIABLE")
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
commonMain {
dependencies {
implementation(project(":file-kache-okio-only"))
api(project(":file-kache-core"))
Expand All @@ -75,4 +77,4 @@ kotlin {
}
}
}
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
kotlin = "1.8.21"
kotlin = "1.9.21"

dokka = "1.8.10"
mavenPublish = "0.25.2"
Expand Down
49 changes: 30 additions & 19 deletions internal-collections/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ plugins {
}

kotlin {
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi::class)
targetHierarchy.default()

jvm {
compilations.configureEach {
kotlinOptions.jvmTarget = "1.8"
Expand All @@ -16,16 +13,29 @@ kotlin {
withJava()
}

js(IR) {
browser()
nodejs()
fun org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsSubTargetDsl.configureTests() {
testTask {
useMocha {
timeout = "30s"
}
}
}

js {
browser { configureTests() }
nodejs { configureTests() }
}

@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
wasmJs {
browser { configureTests() }
nodejs { configureTests() }
d8 { configureTests() }
}

@OptIn(org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl::class)
wasm {
browser()
nodejs()
d8()
wasmWasi {
nodejs { configureTests() }
}

macosX64()
Expand Down Expand Up @@ -55,25 +65,26 @@ kotlin {
androidNativeX86()
androidNativeX64()

@Suppress("UNUSED_VARIABLE")
sourceSets {
val commonMain by getting
applyDefaultHierarchyTemplate()

sourceSets {
val nativeAndWasmMain by creating {
dependsOn(commonMain)
dependsOn(commonMain.get())
}

val nativeMain by getting {
dependsOn(nativeAndWasmMain)
}
nativeMain.get().dependsOn(nativeAndWasmMain)

val wasmMain by getting {
val wasmMain by creating {
dependsOn(nativeAndWasmMain)
}

// WASM source sets are not found in the predefined conventions
getByName("wasmJsMain").dependsOn(wasmMain)
getByName("wasmWasiMain").dependsOn(wasmMain)
}
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
Loading