Skip to content

Commit

Permalink
Drop LEGACY JavaScript compiler support (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
twyatt authored Dec 22, 2021
1 parent 8cfab46 commit 00ab8c8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ task<Copy>("assembleGitHubPages") {
dependsOn(":webapp:browserDevelopmentWebpack", ":koap:dokkaHtml")

into("$buildDir/gh-pages")
from("${project(":webapp").buildDir}/distributions") {
from("${project(":webapp").buildDir}/developmentExecutable") {
include("**")
}

Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ POM_DEVELOPER_URL=https://github.com/twyatt

# Workaround for `java.lang.OutOfMemoryError: Metaspace` on CI.
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

kotlin.js.compiler=ir
2 changes: 1 addition & 1 deletion koap/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jacoco {

kotlin {
jvm()
js(BOTH).browser()
js().browser()
macosX64()

sourceSets {
Expand Down
3 changes: 2 additions & 1 deletion koap/webpack.config.d/webpack.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
config.resolve.fallback = {
"os": require.resolve("os-browserify/browser")
"path": require.resolve("path-browserify"),
"os": require.resolve("os-browserify/browser"),
}
10 changes: 5 additions & 5 deletions webapp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

kotlin {
js(LEGACY) {
js {
browser()
binaries.executable()
}
Expand All @@ -16,13 +16,13 @@ kotlin {
implementation(libs.kotlinx.coroutines.js)
implementation(libs.kotlinx.serialization.json)
implementation(libs.okio.js)
implementation(npm("cbor", "8.1.0"))
implementation(npm("stream-browserify", "3.0.0"))
implementation(npm("util", "0.12.4"))
implementation(npm("buffer", "6.0.3"))
implementation(npm("cbor", "8.1.0"))
implementation(npm("os-browserify", "0.3.0"))
implementation(npm("process", "0.11.10"))
implementation(npm("path-browserify", "1.0.1"))
implementation(npm("process", "0.11.10"))
implementation(npm("stream-browserify", "3.0.0"))
implementation(npm("util", "0.12.4"))
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions webapp/webpack.config.d/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ config.plugins = [
]

config.resolve.fallback = {
"stream": require.resolve("stream-browserify"),
"util": require.resolve("util/"),
"buffer": require.resolve("buffer/"),
"os": require.resolve("os-browserify/browser"),
"process": require.resolve("process/browser"),
"path": require.resolve("path-browserify")
"stream": require.resolve("stream-browserify"),
"util": require.resolve("util/"),
}

0 comments on commit 00ab8c8

Please sign in to comment.