From 92f9a060085046d0a1cf4970284554b19c55bcb2 Mon Sep 17 00:00:00 2001 From: Nekoyue Date: Thu, 2 Apr 2020 20:16:09 +0800 Subject: [PATCH 1/2] Update kotlin and reactjs. --- build.gradle.kts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 384f5d5..b16c0eb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,13 +16,13 @@ dependencies { implementation(kotlin("stdlib-js")) //React, React DOM + Wrappers (chapter 3) - implementation("org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60") - implementation("org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60") - implementation(npm("react", "16.12.0")) - implementation(npm("react-dom", "16.12.0")) + implementation("org.jetbrains:kotlin-react:16.13.0-pre.94-kotlin-1.3.70") + implementation("org.jetbrains:kotlin-react-dom:16.13.0-pre.94-kotlin-1.3.70") + implementation(npm("react", "16.13.1")) + implementation(npm("react-dom", "16.13.1")) //Kotlin Styled (chapter 3) - implementation("org.jetbrains:kotlin-styled:1.0.0-pre.90-kotlin-1.3.61") + implementation("org.jetbrains:kotlin-styled:1.0.0-pre.94-kotlin-1.3.70") implementation(npm("styled-components")) implementation(npm("inline-style-prefixer")) @@ -33,7 +33,7 @@ dependencies { implementation(npm("react-share")) //Coroutines (chapter 8) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.5") } kotlin.target.browser { } \ No newline at end of file From 8e770eb8c4bffc54ee5496a88942df31a6a9fecf Mon Sep 17 00:00:00 2001 From: Sebastian Aigner Date: Mon, 17 Aug 2020 22:33:27 +0200 Subject: [PATCH 2/2] Update code to 1.4 Update Gradle to 6.6 Update dependency versions to 1.4-compatible libraries Add explicit versions to NPM dependencies Use new Gradle DSL for configuring Kotlin/JS Move kotlin.browser to kotlinx.browser --- build.gradle.kts | 29 ++++++++++++++---------- gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/kotlin/Main.kt | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b16c0eb..1b68790 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.jetbrains.kotlin.js") version "1.3.70-eap-184" + id("org.jetbrains.kotlin.js") version "1.4.0" } group = "org.example" @@ -12,28 +12,33 @@ repositories { jcenter() } +kotlin { + js { + browser {} + binaries.executable() + } +} + dependencies { implementation(kotlin("stdlib-js")) //React, React DOM + Wrappers (chapter 3) - implementation("org.jetbrains:kotlin-react:16.13.0-pre.94-kotlin-1.3.70") - implementation("org.jetbrains:kotlin-react-dom:16.13.0-pre.94-kotlin-1.3.70") + implementation("org.jetbrains:kotlin-react:16.13.1-pre.110-kotlin-1.4.0") + implementation("org.jetbrains:kotlin-react-dom:16.13.1-pre.110-kotlin-1.4.0") implementation(npm("react", "16.13.1")) implementation(npm("react-dom", "16.13.1")) //Kotlin Styled (chapter 3) - implementation("org.jetbrains:kotlin-styled:1.0.0-pre.94-kotlin-1.3.70") - implementation(npm("styled-components")) - implementation(npm("inline-style-prefixer")) + implementation("org.jetbrains:kotlin-styled:1.0.0-pre.110-kotlin-1.4.0") + implementation(npm("styled-components", "~5.1.1")) + implementation(npm("inline-style-prefixer", "~6.0.0")) //Video Player (chapter 7) - implementation(npm("react-player")) + implementation(npm("react-player", "~2.6.0")) //Share Buttons (chapter 7) - implementation(npm("react-share")) + implementation(npm("react-share", "~4.2.1")) //Coroutines (chapter 8) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.5") -} - -kotlin.target.browser { } \ No newline at end of file + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9") +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ba94df8..6c9a224 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index efa3a07..15f7cf0 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -1,4 +1,4 @@ -import kotlin.browser.document +import kotlinx.browser.document fun main() { document.bgColor = "blue"