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")) } } }