Skip to content

Commit

Permalink
Make desktop release working
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Apr 5, 2023
1 parent 14b1b2a commit 558f8ff
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
13 changes: 12 additions & 1 deletion desktopApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ version = "1.0-SNAPSHOT"

kotlin {
jvm {
jvmToolchain(11)
withJava()
}
sourceSets {
Expand Down Expand Up @@ -40,6 +39,16 @@ kotlin {
compose.desktop {
application {
mainClass = "com.prof18.feedflow.MainKt"
javaHome = "/Library/Java/JavaVirtualMachines/zulu-18.jdk/Contents/Home"

// buildTypes.release.proguard {
// obfuscate.set(true)
// }
//
// buildTypes.release.proguard {
// configurationFiles.from(project.file("compose-desktop.pro"))
// }

nativeDistributions {

modules("java.instrument", "java.sql", "jdk.unsupported")
Expand All @@ -58,6 +67,8 @@ compose.desktop {

bundleID = "com.prof18.feedflow"

entitlementsFile.set(project.file("default.entitlements")) // <----------- this line

signing {
sign.set(true)
identity.set("Marco Gomiero")
Expand Down
27 changes: 27 additions & 0 deletions desktopApp/compose-desktop.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Okhttp
# JSR 305 annotations are for embedding nullability information.
-dontwarn javax.annotation.**

# A resource is loaded with a relative path so the package of this class must be preserved.
-adaptresourcefilenames okhttp3/internal/publicsuffix/PublicSuffixDatabase.gz

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*

# OkHttp platform used only on JVM and when Conscrypt and other security providers are available.
-dontwarn okhttp3.internal.platform.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**

# Okio

# Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java.
-dontwarn org.codehaus.mojo.animal_sniffer.*

# Jsoup
#Jsoup
-keep public class org.jsoup.** {
public *;
}
-keeppackagenames org.jsoup.nodes
12 changes: 12 additions & 0 deletions desktopApp/default.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ internal fun FeedList(
) {
items(
items = feedItems,
key = { it.id }
) { item ->
FeedItemView(
feedItem = item,
Expand Down

0 comments on commit 558f8ff

Please sign in to comment.