From 2cfc8a8201b121540f6faf9e47c1ffe0553a955e Mon Sep 17 00:00:00 2001 From: rnentjes Date: Tue, 6 May 2025 18:59:15 +0200 Subject: [PATCH] Update output directories and Kotlin version, add buildJS task Modified outputDirectory paths in build scripts and upgraded the Kotlin multiplatform plugin to version 2.1.20. Added a new buildJS task to handle copying files from multiple directories into the web folder. These changes streamline the build process and ensure compatibility with updated tooling. --- audio-worklet/build.gradle.kts | 2 +- build.gradle.kts | 14 +++++++++++++- settings.common.gradle.kts | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/audio-worklet/build.gradle.kts b/audio-worklet/build.gradle.kts index a6179d1..f1b1ebe 100644 --- a/audio-worklet/build.gradle.kts +++ b/audio-worklet/build.gradle.kts @@ -31,7 +31,7 @@ kotlin { } distribution { - outputDirectory.set(File("$projectDir/../web/")) + outputDirectory.set(File("$projectDir/../web2/")) } } } diff --git a/build.gradle.kts b/build.gradle.kts index 6f8a82d..9b25fab 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,7 @@ kotlin { } distribution { - outputDirectory.set(File("$projectDir/web/")) + outputDirectory.set(File("$projectDir/web1/")) } } } @@ -74,6 +74,18 @@ application { mainClass.set("nl.astraeus.vst.chip.MainKt") } +tasks.register("buildJS") { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + dependsOn("audio-worklet:jsBrowserDevelopmentExecutableDistribution") + dependsOn("jsBrowserDevelopmentExecutableDistribution") + + from(layout.projectDirectory.dir("web1")) + into(layout.projectDirectory.dir("web")) + + from(layout.projectDirectory.dir("web2")) + into(layout.projectDirectory.dir("web")) +} + /* Hardcoded deploy configuration */ val deployDirectory = "vst-chip.midi-vst.com" diff --git a/settings.common.gradle.kts b/settings.common.gradle.kts index 2a6468b..e67c5a0 100644 --- a/settings.common.gradle.kts +++ b/settings.common.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { plugins { - kotlin("multiplatform") version "2.1.10" + kotlin("multiplatform") version "2.1.20" } repositories { gradlePluginPortal()