From 3934f4564bcfc4344a77f2726a4a3a44ad9e0810 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Wed, 28 Aug 2024 14:42:57 +0200 Subject: [PATCH] Fix build errors --- app/shared/build.gradle.kts | 24 +++++++++++++++++++++++- app/web/build.gradle.kts | 5 +++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/app/shared/build.gradle.kts b/app/shared/build.gradle.kts index 11bda0b..e3c1e7c 100644 --- a/app/shared/build.gradle.kts +++ b/app/shared/build.gradle.kts @@ -71,7 +71,7 @@ kotlin { jsMain { dependencies { - api("org.jetbrains.kotlin:kotlinx-atomicfu-runtime:1.9.21") + api("org.jetbrains.kotlin:kotlinx-atomicfu-runtime:2.0.20") } } @@ -119,3 +119,25 @@ android { sourceCompatibility = JavaVersion.VERSION_1_8 } } + +tasks { + afterEvaluate { + val compilationTasks = kotlin.targets.flatMap { + buildList { + if (it.name != "android") { + add("compileKotlin${it.name.replaceFirstChar { it.titlecase() }}") + val sourcesJarName = "${it.name}SourcesJar" + add(sourcesJarName) + } else { + add("compileDebugKotlinAndroid") + add("compileReleaseKotlinAndroid") + } + } + } + for (task in compilationTasks) { + named(task) { + dependsOn("kspCommonMainKotlinMetadata") + } + } + } +} diff --git a/app/web/build.gradle.kts b/app/web/build.gradle.kts index ea89772..2d36d04 100644 --- a/app/web/build.gradle.kts +++ b/app/web/build.gradle.kts @@ -13,6 +13,10 @@ kotlin { browser() binaries.executable() compilations.all { + packageJson { + devDependencies += "html-webpack-plugin" to "5.6.0" + devDependencies += "browserify" to "17.0.0" + } compileTaskProvider.configure { compilerOptions { freeCompilerArgs.addAll( @@ -37,6 +41,7 @@ kotlin { implementation(compose.material) implementation(compose.components.resources) implementation(compose.materialIconsExtended) + implementation(npm("@discord/embedded-app-sdk", "1.4.2")) } } }