diff --git a/build-conventions/settings.gradle.kts b/build-conventions/settings.gradle.kts index 8988f6d7..bbe559a6 100644 --- a/build-conventions/settings.gradle.kts +++ b/build-conventions/settings.gradle.kts @@ -4,6 +4,11 @@ plugins { @Suppress("UnstableApiUsage") dependencyResolutionManagement { + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } repositories { mavenLocal() mavenCentral() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3f6fc265..d82b2eb4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" } diff --git a/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt b/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt index 6c324afb..472c3712 100644 --- a/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt +++ b/npm-publish-gradle-plugin/src/main/kotlin/config/kotlinJsTarget.kt @@ -68,10 +68,8 @@ internal fun Project.configure(target: KotlinJsTargetDsl): Unit = with(PluginLog val processResourcesTask = target.compilations.named("main").flatMap { tasks.named(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") }