mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-30 15:48:36 +00:00
Flathub doesn't accept the release manifest, which repackages CI's prebuilt tree. desktopApp/packaging/flatpak/flathub/ builds the tag offline instead: - com.vitorpamplona.amethyst.Amethyst.yml compiles the tag tarball with `:desktopApp:createReleaseDistributable` on the JetBrains Runtime SDK 21.0.11 (prebuilt, as Flathub ships it for com.prof18.feedflow), so the bundled runtime keeps JBR's Wayland toolkit. Sources: the tarball, JBR per arch, Gradle 9.8.0, the init script and gradle-sources.json. - gradle-sources.json: the 2,185 Maven files the build resolves on x86_64 and aarch64 (1,566 Maven Central, 591 Google, 28 JitPack), each with its sha256, laid out as a local Maven repo. - flathub-offline.init.gradle replaces every repository with that repo. - tools/regenerate-gradle-sources.sh reruns the build online per arch in Docker on a fresh Gradle home and turns the module cache into the list (tools/gradle-cache-to-sources.py, which also maps Gradle module metadata's local file names to their published URLs). Checked on aarch64: flatpak-builder builds it without network, the installed Flatpak is 1.19.0 on runtime 26.08 with libawt_wlawt.so, and `flatpak run` reaches the login screen. flatpak-builder-lint passes the manifest and the metainfo; on the build it reports only the two media-URL checks, which expect the absolute dl.flathub.org/media URLs Flathub's builder writes where Debian's AppStream 1.0.5 writes relative ones. Not checked: x86_64 through flatpak-builder, and Flathub's own builder (it can't nest in Docker). The flatpak README's Flathub section now tracks what is left: the AI policy (these files are AI-written, the manifest says so, and the submission must disclose it), domain verification, and submitting from the next tag, whose metainfo has the screenshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
671 B
Groovy
15 lines
671 B
Groovy
// Flathub builds without network: every repository settings.gradle.kts
|
|
// declares is replaced by the Maven repository the manifest lays out from
|
|
// gradle-sources-*.json, so nothing can reach the network even by accident.
|
|
def offlineRepo = new File(System.getenv('AMETHYST_OFFLINE_REPO') ?: 'offline-repository').absoluteFile
|
|
if (!offlineRepo.isDirectory()) {
|
|
throw new GradleException("No offline Maven repository at ${offlineRepo}")
|
|
}
|
|
|
|
settingsEvaluated { settings ->
|
|
[settings.pluginManagement.repositories, settings.dependencyResolutionManagement.repositories].each { repos ->
|
|
repos.clear()
|
|
repos.maven { url = offlineRepo.toURI() }
|
|
}
|
|
}
|