Merge pull request #2643 from mstrofnone/fix/vlc-download-retry

ci(desktop): retry vlcDownload on transient network failures
This commit is contained in:
Vitor Pamplona
2026-04-29 07:51:24 -04:00
committed by GitHub
+20
View File
@@ -1,3 +1,4 @@
import de.undercouch.gradle.tasks.download.Download
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import java.nio.file.Files
@@ -144,6 +145,25 @@ tasks.named("spotlessKotlin") {
mustRunAfter("vlcSetup")
}
// `ir.mahozad.vlc-setup` registers `vlcDownload` / `upxDownload` tasks that
// extend `de.undercouch.gradle.tasks.download.Download`. Defaults are 0 retries
// and a short read timeout, so a transient blip on get.videolan.org fails the
// whole desktop build on CI (Windows MSI, macOS DMG, Linux DEB). Configure all
// Download tasks in this project to retry with generous timeouts so flaky
// network conditions do not break packaging jobs.
tasks.withType<Download>().configureEach {
// 5 attempts total (initial + 4 retries) before failing the task.
retries(4)
// 30s to establish a TCP / TLS connection.
connectTimeout(30_000)
// 5 minutes per attempt for the body — VLC archives are 40-90 MB and
// get.videolan.org can be slow under load.
readTimeout(5 * 60_000)
// Stage to a temp file and rename only on full success, so a partial
// download from one attempt cannot poison the next.
tempAndMove(true)
}
// --- AppImage packaging (Linux) ---
//
// Compose Multiplatform's TargetFormat.AppImage is known-broken in 1.10.x (CMP-7101).