(fix) cleanup Gradle-Build

This commit is contained in:
stefan
2025-06-30 13:25:44 +02:00
parent b2b3c2d93f
commit d2b51aed2c
64 changed files with 300 additions and 410 deletions
+13 -23
View File
@@ -1,6 +1,6 @@
@file:OptIn(ExperimentalWasmDsl::class)
import org.jetbrains.compose.desktop.application.dsl.TargetFormat // HIER FEHLTE DER IMPORT
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
@@ -16,15 +16,13 @@ kotlin {
wasmJs {
outputModuleName = "composeApp"
browser {
val rootDirPath = project.rootDir.path
val projectDirPath = project.projectDir.path
commonWebpackConfig {
outputFileName = "composeApp.js"
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
static = (static ?: mutableListOf()).apply {
// Serve sources to debug inside browser
add(rootDirPath)
add(projectDirPath)
add(project.rootDir.path)
add(project.projectDir.path)
}
}
}
@@ -33,30 +31,22 @@ kotlin {
}
sourceSets {
commonMain.dependencies {
implementation(projects.shared)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
}
val desktopMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.coroutines.swing)
}
}
val commonMain by getting {
dependencies {
commonMain.dependencies {
implementation(projects.shared)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.kotlinx.coroutines.swing)
}
}
}
}
}
@@ -1,10 +1,8 @@
package at.mocode.compose
package at.mocode
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
@@ -1,4 +1,4 @@
package at.mocode.compose
package at.mocode
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
@@ -1,4 +1,4 @@
package at.mocode.compose
package at.mocode
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.ComposeViewport