Repository navigation
fix: Give the APK build more memory and report failures on this fork - #2
Merged
Merged
Conversation
The first sync on main failed twice over: - :app:packageStandardRelease ran out of memory (java.lang.OutOfMemoryError: Java heap space in zipflinger). The project's 4 GB Gradle heap was just enough for unsigned builds, but packaging and signing the ~190 MB APK needs more. Override org.gradle.jvmargs in CI with a 6 GB heap; the runner has 16 GB and had about 5 GB available when the build failed. - The failure issue was never opened. sync.sh adds an "upstream" remote, and gh prefers it over origin, so every gh command (issues, labels and releases) targeted Infomaniak's repository. Set GH_REPO to this repository, and stop hiding errors from label creation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM
fabiocatalao
marked this pull request as ready for review
October 2, 2026 07:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two problems behind the failed first Fork sync run on
main(run 36974915823).The APK build ran out of memory
:app:packageStandardReleasefailed withjava.lang.OutOfMemoryError: Java heap spacein zipflinger, the code that writes the APK. The project'sgradle.propertiesgives Gradle a 4 GB heap. That was barely enough for the earlier unsigned PR builds (one of four failed the same way), and not enough once the ~190 MB APK is also signed.The workflow now overrides
org.gradle.jvmargson the command line with a 6 GB heap and the same 4 GB for Kotlin's daemon. The runner has 16 GB, and about 5 GB was still available when the build failed. Upstream'sgradle.propertiesisn't touched, so this can't conflict on sync. I checked locally that a command-line-Dorg.gradle.jvmargsoverrides the project file.The failure issue was never opened
sync.shadds anupstreamremote, and the GitHub CLI picks it overoriginwhen choosing which repository to act on. So everyghcommand in the workflow (issues, labels and releases) targeted Infomaniak's repository. In the failed run,gh issue createstopped at "could not add label: 'fork-sync' not found". The workflow's token can't write to their repository, so nothing was posted there.The workflow now sets
GH_REPOto this repository. I reproduced the difference withgh api 'repos/{owner}/{repo}'in a clone that has both remotes: withoutGH_REPOit resolves toInfomaniak/android-kDrive, and with it tofabiocatalao/android-kDrive.report.shalso stops hiding errors from label creation, and uses--forceso an existing label isn't reported as an error.Testing
actionlint(with shellcheck) andshellcheckpass.🤖 Generated with Claude Code
https://claude.ai/code/session_01SQpS1fDBQzXvMNRrdX4qgM
Generated by Claude Code