2021-06-20 13:27:01 +02:00
|
|
|
plugins {
|
|
|
|
id("org.jetbrains.kotlin.js") version "1.5.20-RC"
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "fr.username404"
|
|
|
|
version = "0.1"
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("stdlib-js"))
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-html:0.7.3")
|
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
js(IR) {
|
|
|
|
moduleName = "Username404_Website"
|
2021-06-20 15:20:32 +02:00
|
|
|
compilations.all {
|
2021-06-20 15:30:13 +02:00
|
|
|
with(languageSettings) {
|
|
|
|
apiVersion = coreLibrariesVersion.substring(0..2)
|
|
|
|
languageVersion = (apiVersion!!.toDouble() + 0.1).toString()
|
|
|
|
progressiveMode = true
|
|
|
|
}
|
2021-06-20 15:20:32 +02:00
|
|
|
with(kotlinOptions) {
|
2021-06-20 15:42:32 +02:00
|
|
|
moduleKind = "plain"
|
2021-06-20 15:20:32 +02:00
|
|
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
|
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
2021-06-20 15:34:54 +02:00
|
|
|
"-Xopt-in=kotlin.js.ExperimentalJsExport",
|
|
|
|
"-Xir-property-lazy-initialization"
|
2021-06-20 15:20:32 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2021-06-20 13:27:01 +02:00
|
|
|
browser {
|
|
|
|
webpackTask {
|
|
|
|
output.libraryTarget = "global"
|
|
|
|
cssSupport.enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
runTask {
|
|
|
|
cssSupport.enabled = true
|
|
|
|
}
|
|
|
|
|
|
|
|
testTask {
|
|
|
|
useKarma {
|
|
|
|
useFirefoxNightlyHeadless()
|
|
|
|
webpackConfig.cssSupport.enabled = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
binaries.executable()
|
|
|
|
}
|
|
|
|
}
|