Skip to content

Commit

Permalink
Update Kotlin, Gradle, React
Browse files Browse the repository at this point in the history
Update Kotlin, Gradle, React
  • Loading branch information
SebastianAigner committed Feb 14, 2022
1 parent 452259a commit 98ec8a5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
47 changes: 28 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,39 +1,48 @@
plugins {
id("org.jetbrains.kotlin.js") version "1.3.70-eap-184"
kotlin("js") version "1.6.10"
kotlin("plugin.serialization") version "1.6.10"
}

group = "org.example"
version = "1.0-SNAPSHOT"

repositories {
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }
maven("https://kotlin.bintray.com/kotlin-js-wrappers/")
mavenCentral()
jcenter()
}

dependencies {
implementation(kotlin("stdlib-js"))
kotlin {
js {
browser {
commonWebpackConfig {
cssSupport.enabled = true
}
}
binaries.executable()
}
}

dependencies {
//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-wrappers:kotlin-react:17.0.2-pre.297-kotlin-1.6.10")
implementation("org.jetbrains.kotlin-wrappers:kotlin-react-dom:17.0.2-pre.297-kotlin-1.6.10")
implementation(npm("react", "17.0.2"))
implementation(npm("react-dom", "17.0.2"))

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

//Video Player (chapter 7)
implementation(npm("react-player"))
implementation(npm("react-youtube-lite", "1.5.0"))

//Share Buttons (chapter 7)
implementation(npm("react-share"))
implementation(npm("react-share", "4.4.0"))

//Coroutines (chapter 8)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.3")
//Coroutines & serialization (chapter 8)
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2")
}

kotlin.target.browser { }
// Heroku Deployment (chapter 9)
tasks.register("stage") {
dependsOn("build")
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 0 additions & 8 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
pluginManagement {
repositories {
maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }

mavenCentral()

maven { setUrl("https://plugins.gradle.org/m2/") }
}
}
rootProject.name = "confexplorer"

4 changes: 2 additions & 2 deletions src/main/kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import kotlin.browser.document
import kotlinx.browser.document

fun main() {
document.bgColor = "blue"
document.bgColor = "red"
}

0 comments on commit 98ec8a5

Please sign in to comment.