Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Upgrade to Kotlin 1.5.0 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Asher authored Apr 26, 2021
1 parent a2b5937 commit 867b836
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
15 changes: 11 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMetadataTarget
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget

val coroutinesVersion = "1.4.3"
val atomicfuVersion = "0.15.0"
val coroutinesVersion = "1.5.0-RC"
val atomicfuVersion = "0.16.1"

plugins {
kotlin("multiplatform") version "1.4.32"
kotlin("multiplatform") version "1.5.0"
id("org.jetbrains.dokka") version "0.10.0"
id("maven-publish")
id("signing")
Expand Down Expand Up @@ -52,6 +53,12 @@ kotlin {
}
}

targets.withType<org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget> {
val test by compilations.getting {
kotlinOptions.freeCompilerArgs = listOf("-Xopt-in=kotlin.RequiresOptIn")
}
}

// do this in afterEvaluate, when nativeMain compilation becomes available
afterEvaluate {
targets.withType<KotlinMetadataTarget> {
Expand All @@ -71,7 +78,7 @@ kotlin {
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-multiplatform"))
implementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion")
implementation("org.jetbrains.kotlinx:atomicfu:$atomicfuVersion")
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.6.4
VERSION=0.7.0

kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.mpp.enableCompatibilityMetadataVariant=true
2 changes: 2 additions & 0 deletions src/jsTest/kotlin/com/autodesk/coroutineworker/Platform.kt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.autodesk.coroutineworker

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.promise
import kotlin.coroutines.CoroutineContext

@OptIn(DelicateCoroutinesApi::class)
actual fun <T> runBlocking(context: CoroutineContext, block: suspend CoroutineScope.() -> T): dynamic = GlobalScope.promise { block() }

actual fun Any.ensureNeverFrozen() = Unit

0 comments on commit 867b836

Please sign in to comment.