Skip to content

Commit

Permalink
Update plugin to kotlin 2
Browse files Browse the repository at this point in the history
  • Loading branch information
JochenGuckSnk committed Jun 3, 2024
1 parent b505ea8 commit d90697d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 5 additions & 0 deletions build-conventions/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ plugins {

@Suppress("UnstableApiUsage")
dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
repositories {
mavenLocal()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dokka = "1.9.10"
java = "11"
junit-jupiter = "5.10.1"
kotest = "5.8.0"
kotlin = "1.9.22"
kotlin = "2.0.0"

[libraries]
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ internal fun Project.configure(target: KotlinJsTargetDsl): Unit = with(PluginLog
val processResourcesTask = target.compilations.named("main").flatMap {
tasks.named<Copy>(it.processResourcesTaskName)
}
val outputFile = compileKotlinTask.flatMap(Kotlin2JsCompile::outputFileProperty)
// TODO replace the above with this once moduleName can be used to build actual file name
// val outputFile = compileKotlinTask.flatMap(Kotlin2JsCompile::destinationDirectory)
// .zip(compileKotlinTask.flatMap(Kotlin2JsCompile::moduleName)) { dir, file -> dir.file(file).asFile }
val outputFile = compileKotlinTask.flatMap(Kotlin2JsCompile::destinationDirectory)
.zip(compileKotlinTask.flatMap(Kotlin2JsCompile::moduleName)) { dir, file -> dir.file(file).asFile }
val typesFile = outputFile.map {
it.parentFile.resolve("${it.nameWithoutExtension}.d.ts")
}
Expand Down

0 comments on commit d90697d

Please sign in to comment.