Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

fix(android,build): commit Android AARs to git and auto-clone SwiftGodot#21

Merged
hyochan merged 3 commits into
mainfrom
fix/android-aar-and-ios-swiftgodot
Mar 20, 2026
Merged

fix(android,build): commit Android AARs to git and auto-clone SwiftGodot#21
hyochan merged 3 commits into
mainfrom
fix/android-aar-and-ios-swiftgodot

Conversation

@hyochan

@hyochan hyochan commented Mar 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Commit pre-built Android AAR files to git so Asset Library / marketplace installs include them (matching how iOS frameworks are already tracked)
  • Auto-clone SwiftGodot dependency in make setup so iOS source builds work out of the box
  • Add GDAP file generation and version sync for Android plugin

Closes #20

Changes

.gitignore

  • Change *.aarandroid/*.aar to only ignore AARs in the android build dir
  • Un-ignore addons/godot-iap/android/*.aar so pre-built binaries are committed

Android plugin (addons/godot-iap/android/)

  • Add GodotIap.release.aar and GodotIap.debug.aar to git
  • Add GodotIap.gdap with proper dependency declarations

Build system (Makefile)

  • Add SWIFT_GODOT_VERSION variable (v0.74.0)
  • Auto-clone SwiftGodot in make setup if not present
  • Auto-generate GDAP file in make android target

Version sync (scripts/)

  • sync-versions.sh: Update GDAP file's openiap-google version on sync
  • pre-commit: Auto-stage GDAP file when versions change

Test plan

  • make setup clones SwiftGodot automatically
  • make ios succeeds without manual SwiftGodot clone
  • make android generates GDAP file with correct version
  • Asset Library download includes Android AAR files
  • Release workflow still works correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced Android build configuration with automated dependency management for Android libraries.
    • Added SwiftGodot framework setup automation to the build process.
    • Implemented version synchronization for Android dependencies across configuration files.

…dot (#20)

- Un-gitignore addons/godot-iap/android/*.aar so Asset Library installs include pre-built AARs (matching how iOS frameworks are already committed)
- Add GodotIap.gdap file for Android plugin configuration
- Auto-generate GDAP file in `make android` target
- Sync GDAP openiap-google version via sync-versions.sh and pre-commit hook
- Auto-clone SwiftGodot in `make setup` so `make ios` works without manual steps

Closes #20

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR addresses missing Android artifacts and iOS build failures by enabling git tracking of Android .aar files, automating SwiftGodot dependency cloning during setup, generating GDAP configuration files with dependency metadata, and synchronizing version information across build artifacts through version management scripts.

Changes

Cohort / File(s) Summary
Git Ignore Configuration
.gitignore
Changed .aar ignore pattern from global (*.aar) to directory-specific (android/*.aar); removed exception rule for addons/godot-iap/android/*.aar and added comment indicating those files should be tracked.
Build System Setup
Makefile
Added SWIFT_GODOT_VERSION variable and extended setup target to clone SwiftGodot repository with depth 1 when missing; updated android target to generate GodotIap.gdap with local binary metadata and remote dependency list extracted from version configuration.
Android Module Configuration
addons/godot-iap/android/GodotIap.gdap
New GDAP file declaring GodotIap module with local binary source pointing to GodotIap.release.aar and remote dependencies for Android billing client and OpenIAP.
Version Management Automation
scripts/pre-commit, scripts/sync-versions.sh
Updated pre-commit hook to stage GodotIap.gdap when version file changes; extended sync script to update openiap-google dependency version in GDAP file using OS-specific sed syntax.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 The Makefile now hops with purpose true,
SwiftGodot clones when setup runs through,
Android artifacts now tracked with care,
GDAP configurations declare what we share,
Dependencies synced—no more missing fare! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: committing Android AARs to git and auto-cloning SwiftGodot, which directly address the PR's core objectives.
Linked Issues check ✅ Passed All coding requirements from issue #20 are met: Android AARs are committed via .gitignore changes, GDAP file generated with correct dependencies, and SwiftGodot auto-cloning is implemented in the Makefile setup.
Out of Scope Changes check ✅ Passed All changes are directly aligned with issue #20 objectives. The version sync scripts, pre-commit hook, and GDAP generation are supporting infrastructure for the core requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/android-aar-and-ios-swiftgodot

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the project's build and dependency management for both Android and iOS platforms. It aims to improve developer experience by automating the setup of critical dependencies and ensuring consistent inclusion of pre-built binaries for asset distribution. These changes streamline the build process, reduce manual steps, and ensure better compatibility with the Godot Asset Library.

Highlights

  • Android AARs Committed: Pre-built Android AAR files are now committed to Git, ensuring they are included in Asset Library/marketplace installs, mirroring the existing approach for iOS frameworks.
  • SwiftGodot Auto-cloning: The make setup command now automatically clones the SwiftGodot dependency, streamlining the setup process for iOS source builds.
  • GDAP File Management: New functionality has been added for generating and synchronizing the Godot Android Plugin (GDAP) file, including version updates and pre-commit staging.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces several build system improvements, including committing Android AARs, auto-cloning the SwiftGodot dependency, and adding generation for the GodotIap.gdap file. The changes are logical and well-structured. I have one suggestion for the Makefile to improve the robustness and maintainability of the new script logic for generating the .gdap file, primarily by replacing fragile shell parsing with a more reliable method and improving the script's readability.

Comment thread Makefile Outdated
@hyochan hyochan added 🛠 bugfix All kinds of bug fixes 🤖 android Related to android labels Mar 20, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
Makefile (1)

132-141: Consider using a more robust JSON parser for version extraction.

The current approach grep '"google"' | cut -d'"' -f4 works but is sensitive to JSON formatting. If the JSON structure changes (e.g., different whitespace, key ordering), this could break silently.

sync-versions.sh already uses Python's json module for robust parsing. Consider aligning this extraction method for consistency:

♻️ Suggested improvement
-	`@OPENIAP_VERSION`=$$(cat $(PROJECT_ROOT)/openiap-versions.json | grep '"google"' | cut -d'"' -f4); \
+	`@OPENIAP_VERSION`=$$(python3 -c "import json; print(json.load(open('$(PROJECT_ROOT)/openiap-versions.json'))['google'])"); \

This also applies to the duplicate GDAP generation in the test-setup target (lines 271-279).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 132 - 141, Replace the brittle OPENIAP_VERSION
extraction that uses grep/cut with a robust JSON parse (e.g., call Python's json
module or jq) so the Makefile target that builds OPENIAP_VERSION (the shell
block that sets OPENIAP_VERSION=$$(cat ... | grep '"google"' | cut -d'"' -f4))
reliably reads the "google" value; update that same pattern in the duplicate
GDAP generation in the test-setup target as well so both places use the same
json-parsing approach (refer to the OPENIAP_VERSION variable and the GDAP
generation echo block for locations to change).
addons/godot-iap/android/GodotIap.gdap (1)

1-8: Update documentation and consider centralizing the billing library version.

The com.android.billingclient:billing:7.1.1 version is hardcoded in the Makefile (lines 141 and 279) and not centralized like openiap-google. Additionally, the documentation in docs/guides/troubleshooting.md still references the outdated billing:7.0.0, creating a discrepancy with the actual implementation.

Either centralize the billing version in gradle.properties or openiap-versions.json (aligned with the openiap-google version management approach), or at minimum ensure the documentation is updated to reflect 7.1.1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@addons/godot-iap/android/GodotIap.gdap` around lines 1 - 8, The billing
library version is hardcoded as "com.android.billingclient:billing:7.1.1" in
GodotIap.gdap while docs/guides/troubleshooting.md still reference 7.0.0; either
centralize this version (add a billing_version property to gradle.properties or
include it in openiap-versions.json and update the Makefile to reference that
variable) or update the troubleshooting doc to state 7.1.1 to match
GodotIap.gdap; locate references by searching for
"com.android.billingclient:billing" in GodotIap.gdap, the Makefile targets that
assemble dependencies, and docs/guides/troubleshooting.md and make the versions
consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@addons/godot-iap/android/GodotIap.gdap`:
- Around line 1-8: The billing library version is hardcoded as
"com.android.billingclient:billing:7.1.1" in GodotIap.gdap while
docs/guides/troubleshooting.md still reference 7.0.0; either centralize this
version (add a billing_version property to gradle.properties or include it in
openiap-versions.json and update the Makefile to reference that variable) or
update the troubleshooting doc to state 7.1.1 to match GodotIap.gdap; locate
references by searching for "com.android.billingclient:billing" in
GodotIap.gdap, the Makefile targets that assemble dependencies, and
docs/guides/troubleshooting.md and make the versions consistent.

In `@Makefile`:
- Around line 132-141: Replace the brittle OPENIAP_VERSION extraction that uses
grep/cut with a robust JSON parse (e.g., call Python's json module or jq) so the
Makefile target that builds OPENIAP_VERSION (the shell block that sets
OPENIAP_VERSION=$$(cat ... | grep '"google"' | cut -d'"' -f4)) reliably reads
the "google" value; update that same pattern in the duplicate GDAP generation in
the test-setup target as well so both places use the same json-parsing approach
(refer to the OPENIAP_VERSION variable and the GDAP generation echo block for
locations to change).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04fbdc4b-0dfa-4331-b57e-85faba271474

📥 Commits

Reviewing files that changed from the base of the PR and between 0053c60 and 0169edb.

📒 Files selected for processing (7)
  • .gitignore
  • Makefile
  • addons/godot-iap/android/GodotIap.debug.aar
  • addons/godot-iap/android/GodotIap.gdap
  • addons/godot-iap/android/GodotIap.release.aar
  • scripts/pre-commit
  • scripts/sync-versions.sh

hyochan and others added 2 commits March 21, 2026 01:39
Replace fragile grep/cut JSON parsing with python3 and multiple
echo+append with single printf for better robustness and readability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hyochan hyochan merged commit b45b548 into main Mar 20, 2026
7 checks passed
@hyochan hyochan deleted the fix/android-aar-and-ios-swiftgodot branch March 20, 2026 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🤖 android Related to android 🛠 bugfix All kinds of bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reporting missing android Godotlap.release.arr in installation and make iOS build failures

1 participant