diff --git a/build.gradle.kts b/build.gradle.kts index 384f5d5..755ddb8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 { } \ No newline at end of file +// Heroku Deployment (chapter 9) +tasks.register("stage") { + dependsOn("build") +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ba94df8..41dfb87 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-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index b230161..97dac63 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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" diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt index efa3a07..17951e7 100644 --- a/src/main/kotlin/Main.kt +++ b/src/main/kotlin/Main.kt @@ -1,5 +1,5 @@ -import kotlin.browser.document +import kotlinx.browser.document fun main() { - document.bgColor = "blue" + document.bgColor = "red" } \ No newline at end of file