Skip to content

Commit

Permalink
Kotlin 2.0.20 refresh + Uuid Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudgiuliani committed Aug 23, 2024
1 parent 2fd3df6 commit 926a7b6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 54 deletions.
13 changes: 1 addition & 12 deletions projects/compose/koin-compose-viewmodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ kotlin {
}

wasmJs {
binaries.executable()
nodejs()
binaries.executable()
}

iosX64()
Expand All @@ -50,17 +50,6 @@ tasks.withType<KotlinCompile>().all {
}
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

tasks.withType<KotlinCompile>().all {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
Expand Down
12 changes: 1 addition & 11 deletions projects/compose/koin-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
Expand All @@ -24,8 +23,8 @@ kotlin {
}

wasmJs {
binaries.executable()
nodejs()
binaries.executable()
}

iosX64()
Expand All @@ -48,19 +47,10 @@ tasks.withType<KotlinCompile>().all {
}
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

tasks.withType<KotlinCompile>().all {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}

apply(from = file("../../gradle/publish.gradle.kts"))
9 changes: 0 additions & 9 deletions projects/core/koin-core-viewmodel/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,10 @@ tasks.withType<KotlinCompile>().all {
}
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

tasks.withType<KotlinCompile>().all {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}

apply(from = file("../../gradle/publish.gradle.kts"))
12 changes: 2 additions & 10 deletions projects/core/koin-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ kotlin {
}

wasmJs {
binaries.executable()
nodejs()
binaries.executable()
}

iosX64()
Expand All @@ -45,7 +45,7 @@ kotlin {
commonMain.dependencies {
api(libs.extras.stately)
api(libs.extras.stately.collections)
api(libs.extras.uuid)
// api(libs.extras.uuid)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
Expand All @@ -61,12 +61,4 @@ tasks.withType<KotlinCompile>().all {
}
}

rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}
apply(from = file("../../gradle/publish.gradle.kts"))
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
*/
package org.koin.mp

import com.benasher44.uuid.uuid4
import org.koin.core.context.KoinContext
import org.koin.core.logger.Level
import org.koin.core.logger.Logger
import kotlin.reflect.KClass
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

expect object KoinPlatformTools {
fun getStackTrace(e: Exception): String
Expand All @@ -33,5 +34,6 @@ expect object KoinPlatformTools {
}

fun KoinPlatformTools.getKClassDefaultName(kClass: KClass<*>) : String = "KClass@${kClass.hashCode()}"
fun KoinPlatformTools.generateId() : String = uuid4().toString()
@OptIn(ExperimentalUuidApi::class)
fun KoinPlatformTools.generateId() : String = Uuid.random().toString()

10 changes: 1 addition & 9 deletions projects/core/koin-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ kotlin {
binaries.executable()
}
wasmJs {
binaries.executable()
nodejs()
binaries.executable()
}

iosX64()
Expand Down Expand Up @@ -59,13 +59,5 @@ tasks.withType<KotlinCompile>().all {
jvmTarget.set(JvmTarget.JVM_1_8)
}
}
rootProject.the<NodeJsRootExtension>().apply {
nodeVersion = "21.0.0-v8-canary202309143a48826a08"
nodeDownloadBaseUrl = "https://nodejs.org/download/v8-canary"
}

tasks.withType<org.jetbrains.kotlin.gradle.targets.js.npm.tasks.KotlinNpmInstallTask>().configureEach {
args.add("--ignore-engines")
}

apply(from = file("../../gradle/publish.gradle.kts"))
2 changes: 1 addition & 1 deletion projects/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# /!\ Koin in gradle.properties /!\

# Core
kotlin = "2.0.0"
kotlin = "2.0.20"
binaryValidator = "0.16.0"
publish = "2.0.0"
coroutines = "1.8.1"
Expand Down

0 comments on commit 926a7b6

Please sign in to comment.