Skip to content

Commit 363d59f

Browse files
committed
example: Fix build release jvm package
1 parent bd16851 commit 363d59f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

composeApp/build.gradle.kts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ kotlin {
8484
implementation(compose.material3)
8585
implementation(compose.ui)
8686
implementation(compose.components.resources)
87-
implementation(compose.components.uiToolingPreview)
8887

8988
implementation(project(":miuix"))
9089
}
@@ -151,16 +150,16 @@ android {
151150
if (keystorePath != null) signingConfig = signingConfigs.getByName("github")
152151
}
153152
}
154-
155-
dependencies {
156-
debugImplementation(compose.uiTooling)
157-
}
158153
}
159154

160155
compose.desktop {
161156
application {
162157
mainClass = "MainKt"
163158

159+
buildTypes.release.proguard {
160+
configurationFiles.from("proguard-rules-jvm.pro")
161+
}
162+
164163
nativeDistributions {
165164
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
166165
packageName = appName

composeApp/proguard-rules-jvm.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-dontwarn kotlinx.datetime.**

composeApp/src/commonMain/kotlin/UITest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import androidx.compose.animation.fadeOut
66
import androidx.compose.animation.shrinkHorizontally
77
import androidx.compose.animation.shrinkVertically
88
import androidx.compose.foundation.layout.PaddingValues
9+
import androidx.compose.foundation.layout.captionBarPadding
910
import androidx.compose.foundation.layout.fillMaxSize
1011
import androidx.compose.foundation.layout.imePadding
1112
import androidx.compose.foundation.layout.padding
@@ -165,7 +166,8 @@ fun UITest(
165166
FPSMonitor(
166167
modifier = Modifier
167168
.statusBarsPadding()
168-
.padding(start = 28.dp, top = 18.dp)
169+
.captionBarPadding()
170+
.padding(horizontal = 4.dp)
169171
)
170172
}
171173
}

composeApp/src/commonMain/kotlin/component/OtherComponent.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import top.yukonga.miuix.kmp.theme.MiuixTheme
3232

3333
@Composable
3434
fun OtherComponent(padding: PaddingValues) {
35-
3635
var buttonText by remember { mutableStateOf("Cancel") }
3736
var submitButtonText by remember { mutableStateOf("Submit") }
3837
var clickCount by remember { mutableStateOf(0) }

0 commit comments

Comments
 (0)