Skip to content

Gradle-Build-Cache aktivieren und unsigned AAB-Build hinzufügen#116

Open
Android-PowerUser wants to merge 1 commit into
mainfrom
update-build-configuration-files
Open

Gradle-Build-Cache aktivieren und unsigned AAB-Build hinzufügen#116
Android-PowerUser wants to merge 1 commit into
mainfrom
update-build-configuration-files

Conversation

@Android-PowerUser
Copy link
Copy Markdown
Owner

Motivation

  • Die CI-Performance verbessern und Folge-Builds beschleunigen, indem der Gradle-Build-Cache genutzt wird.
  • Release-Signing-Validierung nur für tatsächliche assemble*Release*-Tasks erzwingen, damit bundleRelease für AABs unsigned möglich bleibt.
  • Sicherstellen, dass die native 16KB-Alignment-Prüfung auch für AAB-Bundles ausgeführt wird.
  • CI-Workflow so anpassen, dass APK-Uploads nicht durch AAB-Builds verzögert werden und CI-JVM-Settings für GHA erhöht werden.

Description

  • gradle.properties: Build-Cache aktiviert durch Setzen von org.gradle.caching=true.
  • app/build.gradle.kts: Namens- und Logikänderung der Release-Check-Variable von isReleaseTaskRequested zu isAssembleReleaseRequested, die nun nur auf Tasks prüft, die sowohl assemble als auch release enthalten, und dadurch bundleRelease nicht blockiert.
  • app/build.gradle.kts: Die 16KB-Verify-Task-Abhängigkeit wird zusätzlich an bundle$variantNameCap gehängt (assemble oder bundle führen nun das Verify aus).
  • .github/workflows/manual.yml: Im build-Job nach Set up JDK 17 ein actions/cache-Step für ~/.gradle/build-cache hinzugefügt; CI-sed-Fix entfernt nun die kotlin.daemon.jvmargs-Zeile und erhöht org.gradle.jvmargs auf -Xmx3072m; der Release-AAB-Build (:app:bundleRelease) und Upload laufen nun nach den APK-Uploads; die Build-Summary wurde erweitert, um AAB-Artefakte zu erwähnen.

Testing

  • ./gradlew :app:compileDebugKotlin wurde lokal ausgeführt und endete mit BUILD SUCCESSFUL (16 tasks ausgeführt).
  • git diff --check wurde ausgeführt und es wurden keine whitespace-/diff-Fehler gefunden.

Codex Task

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This PR successfully implements Gradle build cache activation and unsigned AAB builds. The core changes are solid:

✅ Build cache enabled in gradle.properties
✅ Release signing check correctly scoped to assembleRelease tasks only
✅ 16KB alignment verification extended to AAB bundles
✅ CI workflow updated with appropriate JVM memory settings
✅ Unsigned AAB build and upload steps added

Critical Issue (1)

Cache Invalidation: The GitHub Actions cache key includes source file patterns which will invalidate the cache on every code change, significantly reducing cache effectiveness.

The PR is well-structured and aligns with the stated goals. Once the cache key issue is addressed, this will provide meaningful CI performance improvements.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

uses: actions/cache@v4
with:
path: ~/.gradle/build-cache
key: gradle-build-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', '**/gradle.properties', 'app/src/**', 'humanoperator/src/**') }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛑 Cache Invalidation Issue: The cache key includes source file patterns (app/src/**, humanoperator/src/**) which will invalidate the build cache on every source code change, defeating its purpose. The Gradle build cache is content-based and doesn't need source files in the cache key. Remove source patterns to maximize cache hits across builds.

Suggested change
key: gradle-build-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', '**/gradle.properties', 'app/src/**', 'humanoperator/src/**') }}
key: gradle-build-cache-${{ runner.os }}-${{ hashFiles('**/*.gradle.kts', '**/gradle.properties') }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant