Skip to content

Commit 7351be2

Browse files
committed
build: configure platform-specific packaging tasks and add ProGuard rules for Ktor dependencies
1 parent 1d32eeb commit 7351be2

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

‎.github/workflows/build-desktop.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,19 @@ jobs:
7272
echo "updater_url=$UPDATER_URL" >> composeApp/src/jvmMain/resources/props.properties
7373
echo "feedback_url=$FEEDBACK_URL" >> composeApp/src/jvmMain/resources/props.properties
7474
- name: Build native packages
75-
run: ./gradlew packageReleaseDistributionForCurrentOS --stacktrace
75+
shell: bash
76+
run: |
77+
case "${{ matrix.format }}" in
78+
macos-arm|macos-intel)
79+
./gradlew packageReleaseDmg --stacktrace
80+
;;
81+
windows)
82+
./gradlew packageReleaseMsi --stacktrace
83+
;;
84+
linux)
85+
./gradlew packageReleaseDeb --stacktrace
86+
;;
87+
esac
7688
7789
# macOS ARM
7890
- name: Rename macOS ARM DMG

‎composeApp/compose-desktop.pro‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,13 @@
108108
-keeppackagenames org.jsoup.nodes
109109
-keep public enum * { public static **[] values(); public static ** valueOf(java.lang.String); }
110110

111-
-ignorewarnings
111+
-ignorewarnings
112+
113+
# Ktor (HTTP client). Many internals resolved via ServiceLoader / reflection.
114+
-keep class io.ktor.** { *; }
115+
-keepclassmembers class io.ktor.** { *; }
116+
-dontwarn io.ktor.**
117+
118+
# CIO engine factory is discovered through META-INF/services.
119+
-keep class * implements io.ktor.client.HttpClientEngineContainer { *; }
120+
-keep class io.ktor.client.engine.cio.** { *; }

0 commit comments

Comments
 (0)