diff --git a/build.gradle.kts b/build.gradle.kts index 21e3af6..a623cc1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.jetbrains.kotlin.js") version "1.8.20" + id("org.jetbrains.kotlin.js") version "1.9.0" } group = "fr.username404" @@ -14,7 +14,7 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}") } -val outputDirectory = file("$rootDir/compiledOutput") +val compilationOutputDirectory = file("$rootDir/compiledOutput") kotlin { js(IR) { @@ -25,7 +25,13 @@ kotlin { apiVersion = coreLibrariesVersion.run { substring(0 until secondDot) } - languageVersion = apiVersion!!.substringBefore('.') + '.' + (apiVersion!!.substringAfter('.').toInt() + 1).toString() + val majorVersion = apiVersion!!.substringBefore('.').toInt() + val minorVersion = apiVersion!!.substringAfter('.').toInt() + languageVersion = if (minorVersion == 9) { + "${majorVersion + 1}.0" + } else { + "$majorVersion.${minorVersion + 1}" + } moduleKind = "plain" freeCompilerArgs = freeCompilerArgs + listOf( @@ -36,31 +42,31 @@ kotlin { } } browser { - webpackTask { - destinationDirectory = outputDirectory + webpackTask(Action { + outputDirectory = compilationOutputDirectory output.library = "Web404" output.libraryTarget = "this" cssSupport { isEnabled = true } - } - - runTask { + }) + + runTask(Action { cssSupport { isEnabled = true } - } + }) - testTask { + testTask(Action { useKarma { useFirefoxNightlyHeadless() webpackConfig.cssSupport { isEnabled = true } } - } + }) } binaries.executable() } } tasks { - clean.get().delete.add(outputDirectory) + clean.get().delete.add(compilationOutputDirectory) withType(ProcessResources::class) { - destinationDir = outputDirectory + destinationDir = compilationOutputDirectory } } diff --git a/gradle.properties b/gradle.properties index 6a72ca8..e7f7f04 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,5 +6,6 @@ org.gradle.caching=true org.gradle.parallel=true org.gradle.unsafe.configuration-cache=on org.gradle.vfs.watch=true +kotlin.experimental.tryK2=true -kotlinx-html_version=0.8.0+ +kotlinx-html_version=0.9.1+ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e6f16f6..70f299e 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-8.1-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists