adjust proguard rules
|
|
@ -91,6 +91,30 @@ abstract class GenerateRuntimeConfigsTask : DefaultTask() {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class RenameReleaseDmgTask : DefaultTask() {
|
||||
@get:Input
|
||||
abstract val versionName: Property<String>
|
||||
|
||||
@get:OutputDirectory
|
||||
abstract val dmgDirectory: DirectoryProperty
|
||||
|
||||
@TaskAction
|
||||
fun renameArtifact() {
|
||||
val dmgDir = dmgDirectory.get().asFile
|
||||
val targetFile = dmgDir.resolve("Nuvio-${versionName.get()}.dmg")
|
||||
val sourceFile = dmgDir.listFiles()
|
||||
?.filter { it.extension == "dmg" && it.name.startsWith("Nuvio-") }
|
||||
?.maxByOrNull { it.lastModified() }
|
||||
?: error("No DMG output found in ${dmgDir.path}")
|
||||
|
||||
if (sourceFile.absolutePath != targetFile.absolutePath) {
|
||||
targetFile.delete()
|
||||
sourceFile.copyTo(targetFile, overwrite = true)
|
||||
sourceFile.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun readXcconfigValue(file: File, key: String): String? {
|
||||
if (!file.exists()) return null
|
||||
return file.readLines()
|
||||
|
|
@ -281,8 +305,16 @@ dependencies {
|
|||
compose.desktop {
|
||||
application {
|
||||
mainClass = "com.nuvio.app.DesktopAppKt"
|
||||
buildTypes.release.proguard {
|
||||
configurationFiles.from(project.file("desktop-proguard-rules.pro"))
|
||||
}
|
||||
nativeDistributions {
|
||||
packageName = "Nuvio"
|
||||
modules("java.net.http")
|
||||
targetFormats(org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg)
|
||||
macOS {
|
||||
dockName = "Nuvio"
|
||||
iconFile.set(project.file("desktop-icons/nuvio.icns"))
|
||||
infoPlist {
|
||||
extraKeysRawXml = """
|
||||
<key>NSRequiresAquaSystemAppearance</key>
|
||||
|
|
@ -294,6 +326,15 @@ compose.desktop {
|
|||
}
|
||||
}
|
||||
|
||||
val renameReleaseDmgArtifact = tasks.register<RenameReleaseDmgTask>("renameReleaseDmgArtifact") {
|
||||
versionName.set(releaseAppVersionName)
|
||||
dmgDirectory.set(layout.buildDirectory.dir("compose/binaries/main-release/dmg"))
|
||||
}
|
||||
|
||||
tasks.matching { it.name == "packageReleaseDistributionForCurrentOS" || it.name == "packageReleaseDmg" }.configureEach {
|
||||
finalizedBy(renameReleaseDmgArtifact)
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
exclude(group = "androidx.media3", module = "media3-exoplayer")
|
||||
exclude(group = "androidx.media3", module = "media3-ui")
|
||||
|
|
|
|||
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_128x128.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_128x128@2x.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_16x16.png
Normal file
|
After Width: | Height: | Size: 859 B |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_16x16@2x.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_256x256.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_256x256@2x.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_32x32.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_32x32@2x.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_512x512.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
composeApp/desktop-icons/Nuvio.iconset/icon_512x512@2x.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
composeApp/desktop-icons/nuvio.icns
Normal file
34
composeApp/desktop-proguard-rules.pro
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
-dontshrink
|
||||
-dontoptimize
|
||||
-dontobfuscate
|
||||
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
|
||||
|
||||
-keep class com.nuvio.app.** { *; }
|
||||
-keep interface com.nuvio.app.** { *; }
|
||||
-keep enum com.nuvio.app.** { *; }
|
||||
|
||||
-keep class coil3.** { *; }
|
||||
-keep interface coil3.** { *; }
|
||||
-keep enum coil3.** { *; }
|
||||
|
||||
-keep class io.ktor.** { *; }
|
||||
-keep interface io.ktor.** { *; }
|
||||
-keep enum io.ktor.** { *; }
|
||||
|
||||
-keep class kotlinx.serialization.** { *; }
|
||||
-keep interface kotlinx.serialization.** { *; }
|
||||
-keep enum kotlinx.serialization.** { *; }
|
||||
|
||||
-keep class dev.whyoleg.** { *; }
|
||||
-keep interface dev.whyoleg.** { *; }
|
||||
-keep enum dev.whyoleg.** { *; }
|
||||
|
||||
-keep class com.typesafe.config.** { *; }
|
||||
-keep interface com.typesafe.config.** { *; }
|
||||
-keep enum com.typesafe.config.** { *; }
|
||||
|
||||
-keep class io.ktor.client.engine.java.** { *; }
|
||||
-keep class io.ktor.serialization.kotlinx.json.** { *; }
|
||||
-keep class coil3.network.ktor3.internal.** { *; }
|
||||
-keep class dev.whyoleg.cryptography.providers.jdk.** { *; }
|
||||
-keep class io.ktor.server.config.** { *; }
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
CURRENT_PROJECT_VERSION=26
|
||||
CURRENT_PROJECT_VERSION=27
|
||||
MARKETING_VERSION=0.1.0
|
||||
|
||||
|
|
|
|||