Skip to content

Commit 98ec8a5

Browse files
Update Kotlin, Gradle, React
Update Kotlin, Gradle, React
1 parent 452259a commit 98ec8a5

File tree

4 files changed

+31
-30
lines changed

4 files changed

+31
-30
lines changed

build.gradle.kts

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,48 @@
11
plugins {
2-
id("org.jetbrains.kotlin.js") version "1.3.70-eap-184"
2+
kotlin("js") version "1.6.10"
3+
kotlin("plugin.serialization") version "1.6.10"
34
}
45

56
group = "org.example"
67
version = "1.0-SNAPSHOT"
78

89
repositories {
9-
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }
10-
maven("https://kotlin.bintray.com/kotlin-js-wrappers/")
1110
mavenCentral()
12-
jcenter()
1311
}
1412

15-
dependencies {
16-
implementation(kotlin("stdlib-js"))
13+
kotlin {
14+
js {
15+
browser {
16+
commonWebpackConfig {
17+
cssSupport.enabled = true
18+
}
19+
}
20+
binaries.executable()
21+
}
22+
}
1723

24+
dependencies {
1825
//React, React DOM + Wrappers (chapter 3)
19-
implementation("org.jetbrains:kotlin-react:16.9.0-pre.89-kotlin-1.3.60")
20-
implementation("org.jetbrains:kotlin-react-dom:16.9.0-pre.89-kotlin-1.3.60")
21-
implementation(npm("react", "16.12.0"))
22-
implementation(npm("react-dom", "16.12.0"))
26+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react:17.0.2-pre.297-kotlin-1.6.10")
27+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:17.0.2-pre.297-kotlin-1.6.10")
28+
implementation(npm("react", "17.0.2"))
29+
implementation(npm("react-dom", "17.0.2"))
2330

24-
//Kotlin Styled (chapter 3)
25-
implementation("org.jetbrains:kotlin-styled:1.0.0-pre.90-kotlin-1.3.61")
26-
implementation(npm("styled-components"))
27-
implementation(npm("inline-style-prefixer"))
31+
//Kotlin React CSS (chapter 3)
32+
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-css:17.0.2-pre.298-kotlin-1.6.10")
2833

2934
//Video Player (chapter 7)
30-
implementation(npm("react-player"))
35+
implementation(npm("react-youtube-lite", "1.5.0"))
3136

3237
//Share Buttons (chapter 7)
33-
implementation(npm("react-share"))
38+
implementation(npm("react-share", "4.4.0"))
3439

35-
//Coroutines (chapter 8)
36-
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3")
40+
//Coroutines & serialization (chapter 8)
41+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
42+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
3743
}
3844

39-
kotlin.target.browser { }
45+
// Heroku Deployment (chapter 9)
46+
tasks.register("stage") {
47+
dependsOn("build")
48+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

settings.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
pluginManagement {
2-
repositories {
3-
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }
41

5-
mavenCentral()
6-
7-
maven { setUrl("https://plugins.gradle.org/m2/") }
8-
}
9-
}
102
rootProject.name = "confexplorer"
113

src/main/kotlin/Main.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import kotlin.browser.document
1+
import kotlinx.browser.document
22

33
fun main() {
4-
document.bgColor = "blue"
4+
document.bgColor = "red"
55
}

0 commit comments

Comments
 (0)