66 lines
1.7 KiB
Plaintext
66 lines
1.7 KiB
Plaintext
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")
|
|
}
|
|
|
|
val outputDirectory = file("$rootDir/compiledOutput")
|
|
|
|
kotlin {
|
|
js(IR) {
|
|
moduleName = "Username404_Website"
|
|
compilations.all {
|
|
with(languageSettings) {
|
|
apiVersion = coreLibrariesVersion.substring(0..2)
|
|
languageVersion = (apiVersion!!.toDouble() + 0.1).toString()
|
|
progressiveMode = true
|
|
}
|
|
with(kotlinOptions) {
|
|
moduleKind = "plain"
|
|
freeCompilerArgs = freeCompilerArgs + listOf(
|
|
"-Xopt-in=kotlin.RequiresOptIn",
|
|
"-Xopt-in=kotlin.js.ExperimentalJsExport",
|
|
"-Xir-property-lazy-initialization"
|
|
)
|
|
}
|
|
}
|
|
browser {
|
|
webpackTask {
|
|
destinationDirectory = outputDirectory
|
|
output.library = "Web404"
|
|
output.libraryTarget = "this"
|
|
cssSupport.enabled = true
|
|
}
|
|
|
|
runTask {
|
|
cssSupport.enabled = true
|
|
}
|
|
|
|
testTask {
|
|
useKarma {
|
|
useFirefoxNightlyHeadless()
|
|
webpackConfig.cssSupport.enabled = true
|
|
}
|
|
}
|
|
}
|
|
binaries.executable()
|
|
}
|
|
}
|
|
|
|
tasks {
|
|
clean.get().delete.add(outputDirectory)
|
|
withType(ProcessResources::class) {
|
|
destinationDir = outputDirectory
|
|
}
|
|
}
|