Update dependencies

This commit is contained in:
Username404 2023-08-10 18:38:55 +02:00
parent 1c8d5bc28e
commit e65f3dbadf
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
3 changed files with 22 additions and 15 deletions

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("org.jetbrains.kotlin.js") version "1.8.20" id("org.jetbrains.kotlin.js") version "1.9.0"
} }
group = "fr.username404" group = "fr.username404"
@ -14,7 +14,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}") implementation("org.jetbrains.kotlinx:kotlinx-html:${rootProject.property("kotlinx-html_version")}")
} }
val outputDirectory = file("$rootDir/compiledOutput") val compilationOutputDirectory = file("$rootDir/compiledOutput")
kotlin { kotlin {
js(IR) { js(IR) {
@ -25,7 +25,13 @@ kotlin {
apiVersion = coreLibrariesVersion.run { apiVersion = coreLibrariesVersion.run {
substring(0 until secondDot) 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" moduleKind = "plain"
freeCompilerArgs = freeCompilerArgs + listOf( freeCompilerArgs = freeCompilerArgs + listOf(
@ -36,31 +42,31 @@ kotlin {
} }
} }
browser { browser {
webpackTask { webpackTask(Action {
destinationDirectory = outputDirectory outputDirectory = compilationOutputDirectory
output.library = "Web404" output.library = "Web404"
output.libraryTarget = "this" output.libraryTarget = "this"
cssSupport { isEnabled = true } cssSupport { isEnabled = true }
} })
runTask { runTask(Action {
cssSupport { isEnabled = true } cssSupport { isEnabled = true }
} })
testTask { testTask(Action {
useKarma { useKarma {
useFirefoxNightlyHeadless() useFirefoxNightlyHeadless()
webpackConfig.cssSupport { isEnabled = true } webpackConfig.cssSupport { isEnabled = true }
} }
} })
} }
binaries.executable() binaries.executable()
} }
} }
tasks { tasks {
clean.get().delete.add(outputDirectory) clean.get().delete.add(compilationOutputDirectory)
withType(ProcessResources::class) { withType(ProcessResources::class) {
destinationDir = outputDirectory destinationDir = compilationOutputDirectory
} }
} }

View File

@ -6,5 +6,6 @@ org.gradle.caching=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.unsafe.configuration-cache=on org.gradle.unsafe.configuration-cache=on
org.gradle.vfs.watch=true org.gradle.vfs.watch=true
kotlin.experimental.tryK2=true
kotlinx-html_version=0.8.0+ kotlinx-html_version=0.9.1+

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists