From 1fd5b2a26532c32543e6db62ec789ff97e6c1a47 Mon Sep 17 00:00:00 2001 From: Maciej Procyk Date: Tue, 30 Jan 2024 13:31:22 +0100 Subject: [PATCH] cleanup configurations --- desktop-app/build.gradle.kts | 46 ++++++++++++++++------------------ shared-client/build.gradle.kts | 12 --------- web-app/build.gradle.kts | 5 +--- 3 files changed, 23 insertions(+), 40 deletions(-) diff --git a/desktop-app/build.gradle.kts b/desktop-app/build.gradle.kts index 3321ac6..38b47e6 100644 --- a/desktop-app/build.gradle.kts +++ b/desktop-app/build.gradle.kts @@ -20,32 +20,30 @@ kotlin { } } -compose.desktop { - application { - mainClass = "ml.dev.kotlin.minigames.app.MainAppKt" - version = VERSION - - nativeDistributions { - targetFormats(TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Dmg) - packageName = "MiniGames" - - windows { - menu = true - upgradeUuid = "e60c3562-48f8-47db-91d9-ca54dfa92f35" - iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.ico")) - } +compose.desktop.application { + mainClass = "ml.dev.kotlin.minigames.app.MainAppKt" + version = VERSION + + nativeDistributions { + targetFormats(TargetFormat.Msi, TargetFormat.Deb, TargetFormat.Dmg) + packageName = "MiniGames" + + windows { + menu = true + upgradeUuid = "e60c3562-48f8-47db-91d9-ca54dfa92f35" + iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.ico")) + } - linux { - iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.png")) - } + linux { + iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.png")) + } - macOS { - bundleID = "ml.dev.kotlin.minigames.app" - appStore = false - iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.icns")) - signing { - sign.set(false) - } + macOS { + bundleID = "ml.dev.kotlin.minigames.app" + appStore = false + iconFile.set(projectDir.resolve("src/jvmMain/resources/ic_launcher.icns")) + signing { + sign.set(false) } } } diff --git a/shared-client/build.gradle.kts b/shared-client/build.gradle.kts index 9b7c8fe..398e529 100644 --- a/shared-client/build.gradle.kts +++ b/shared-client/build.gradle.kts @@ -1,7 +1,6 @@ import com.codingfeline.buildkonfig.compiler.FieldSpec.Type.STRING import com.codingfeline.buildkonfig.gradle.TargetConfigDsl import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi -import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl plugins { @@ -171,10 +170,6 @@ buildkonfig { } } -compose.experimental { - web.application {} -} - android { compileSdk = Constants.Android.compileSdk namespace = "ml.dev.kotlin.minigames.shared.client" @@ -193,13 +188,6 @@ android { } } -fun KotlinNativeTarget.configureBinary() = apply { - binaries.framework { - baseName = "shared_client" - binaryOption("bundleId", "ml.dev.kotlin.shared.client") - } -} - fun TargetConfigDsl.buildConfigString(name: String) { val value = ENV[name] ?: throw IllegalStateException("$name not defined") buildConfigField(STRING, name, value) diff --git a/web-app/build.gradle.kts b/web-app/build.gradle.kts index 1f5c8fb..8028115 100644 --- a/web-app/build.gradle.kts +++ b/web-app/build.gradle.kts @@ -1,7 +1,5 @@ import org.jetbrains.compose.ExperimentalComposeLibrary import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl -import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension -import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig plugins { @@ -36,6 +34,5 @@ kotlin { } } -compose.experimental { - web.application {} +compose.experimental.web.application { } \ No newline at end of file