mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Fix CI prebuilt ProGuard task ordering and env scoping.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -25,7 +25,6 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx6g
|
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx6g -Dkotlin.daemon.jvm.options=-Xmx6g
|
||||||
FROMCHAT_PREBUILT_PROGUARD: "1"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
resolve-version:
|
resolve-version:
|
||||||
@@ -53,6 +52,8 @@ jobs:
|
|||||||
needs: resolve-version
|
needs: resolve-version
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
env:
|
||||||
|
FROMCHAT_PREBUILT_PROGUARD: "0"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-java@v4
|
- uses: actions/setup-java@v4
|
||||||
@@ -115,6 +116,8 @@ jobs:
|
|||||||
|
|
||||||
windows-package:
|
windows-package:
|
||||||
needs: [resolve-version, desktop-proguard, windows-common]
|
needs: [resolve-version, desktop-proguard, windows-common]
|
||||||
|
env:
|
||||||
|
FROMCHAT_PREBUILT_PROGUARD: "1"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -158,8 +161,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
export FROMCHAT_PACKAGING_JDK="$JAVA_HOME"
|
||||||
args=(
|
args=(
|
||||||
:app:desktop:createReleaseDistributable
|
|
||||||
:app:desktop:patchWindowsJpackageReleaseIcon
|
|
||||||
:app:desktop:packSetupOnly
|
:app:desktop:packSetupOnly
|
||||||
"-PdesktopArch=${{ matrix.arch }}"
|
"-PdesktopArch=${{ matrix.arch }}"
|
||||||
--no-daemon
|
--no-daemon
|
||||||
@@ -177,6 +178,8 @@ jobs:
|
|||||||
|
|
||||||
macos:
|
macos:
|
||||||
needs: [resolve-version, desktop-proguard]
|
needs: [resolve-version, desktop-proguard]
|
||||||
|
env:
|
||||||
|
FROMCHAT_PREBUILT_PROGUARD: "1"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -238,6 +241,8 @@ jobs:
|
|||||||
|
|
||||||
linux:
|
linux:
|
||||||
needs: [resolve-version, desktop-proguard]
|
needs: [resolve-version, desktop-proguard]
|
||||||
|
env:
|
||||||
|
FROMCHAT_PREBUILT_PROGUARD: "1"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|||||||
@@ -989,8 +989,7 @@ val patchWindowsJpackageReleaseIcon = tasks.register<Exec>("patchWindowsJpackage
|
|||||||
group = "compose desktop"
|
group = "compose desktop"
|
||||||
description = "Embed branded icon into release jpackage FromChat.exe."
|
description = "Embed branded icon into release jpackage FromChat.exe."
|
||||||
onlyIf { runningOnWindows }
|
onlyIf { runningOnWindows }
|
||||||
dependsOn(ensureWindowsRustBinaries)
|
dependsOn(ensureWindowsRustBinaries, "createReleaseDistributable")
|
||||||
mustRunAfter("createReleaseDistributable")
|
|
||||||
doFirst {
|
doFirst {
|
||||||
val appImageDir = releaseAppImageDir.get().asFile
|
val appImageDir = releaseAppImageDir.get().asFile
|
||||||
check(appImageDir.isDirectory) { "Missing app image at ${appImageDir.absolutePath}" }
|
check(appImageDir.isDirectory) { "Missing app image at ${appImageDir.absolutePath}" }
|
||||||
@@ -1094,7 +1093,7 @@ tasks.register<Exec>("packSetupOnly") {
|
|||||||
group = "compose desktop"
|
group = "compose desktop"
|
||||||
description = "Repack setup EXE from existing app-image + Rust (skips ProGuard)."
|
description = "Repack setup EXE from existing app-image + Rust (skips ProGuard)."
|
||||||
onlyIf { runningOnWindows }
|
onlyIf { runningOnWindows }
|
||||||
dependsOn(ensureWindowsRustBinaries)
|
dependsOn(ensureWindowsRustBinaries, "createReleaseDistributable", "patchWindowsJpackageReleaseIcon")
|
||||||
configureWindowsPackTask(
|
configureWindowsPackTask(
|
||||||
appImageDir = releaseAppImageDir,
|
appImageDir = releaseAppImageDir,
|
||||||
setupOutput = windowsSetupOutput,
|
setupOutput = windowsSetupOutput,
|
||||||
@@ -1149,16 +1148,24 @@ tasks.register<Exec>("packageBetaWindows") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
|
val exportingProguardForCi = gradle.startParameter.taskNames.any {
|
||||||
|
it.contains("exportReleaseProguardForCi")
|
||||||
|
}
|
||||||
tasks.matching { it.name == "proguardReleaseJars" }.configureEach {
|
tasks.matching { it.name == "proguardReleaseJars" }.configureEach {
|
||||||
onlyIf {
|
onlyIf {
|
||||||
!useCiPrebuiltProguard() || !ciPrebuiltProguardDir.get().asFile.isDirectory
|
exportingProguardForCi ||
|
||||||
|
!useCiPrebuiltProguard() ||
|
||||||
|
!ciPrebuiltProguardDir.get().asFile.isDirectory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tasks.matching {
|
|
||||||
it.name == "createReleaseDistributable" || it.name == "createReleaseDistributableImpl"
|
|
||||||
}.configureEach {
|
|
||||||
if (useCiPrebuiltProguard()) {
|
if (useCiPrebuiltProguard()) {
|
||||||
dependsOn("stageCiPrebuiltProguard")
|
val stagePrebuilt = tasks.named("stageCiPrebuiltProguard")
|
||||||
|
tasks.matching {
|
||||||
|
it.name == "createReleaseDistributable" ||
|
||||||
|
it.name == "createReleaseDistributableImpl" ||
|
||||||
|
(it.name.startsWith("packageRelease") && it.name != "packageReleaseFromPrebuiltProguard")
|
||||||
|
}.configureEach {
|
||||||
|
dependsOn(stagePrebuilt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tasks.matching { it.name == "createRuntimeImage" || it.name == "createReleaseRuntimeImage" }.configureEach {
|
tasks.matching { it.name == "createRuntimeImage" || it.name == "createReleaseRuntimeImage" }.configureEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user