Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ android/.gradle/
android/build/
android/local.properties
android/libs/
*.aar
android/*.aar

# iOS - Old native plugin (deprecated, now using GDExtension)
/ios/
Expand Down Expand Up @@ -67,8 +67,11 @@ Thumbs.db
docs/.docusaurus/
docs/node_modules/

# Android binaries (built locally, not committed)
addons/godot-iap/android/*.aar
# Android binaries are committed to git (like iOS frameworks) for Asset Library compatibility
# addons/godot-iap/android/*.aar - TRACKED

# Old Android binaries in bin/ (deprecated location, use addons/godot-iap/android/ instead)
addons/godot-iap/bin/android/

# iOS frameworks are committed to git for faster CI builds
# addons/godot-iap/bin/ios/ - TRACKED
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

GODOT_VERSION ?= 4.3
GODOT_LIB_URL = https://github.com/godotengine/godot/releases/download/$(GODOT_VERSION)-stable/godot-lib.$(GODOT_VERSION).stable.template_release.aar
SWIFT_GODOT_VERSION ?= v0.74.0

# Directories
PROJECT_ROOT := $(shell pwd)
Expand Down Expand Up @@ -82,6 +83,14 @@ setup:
else \
echo "$(GREEN)✓ godot-lib.aar already exists$(NC)"; \
fi
@if [ ! -d "$(PROJECT_ROOT)/SwiftGodot" ]; then \
echo "$(YELLOW)Cloning SwiftGodot ($(SWIFT_GODOT_VERSION))...$(NC)"; \
git clone --depth 1 --branch $(SWIFT_GODOT_VERSION) https://github.com/migueldeicaza/SwiftGodot.git "$(PROJECT_ROOT)/SwiftGodot" || \
(echo "$(RED)Failed to clone SwiftGodot$(NC)" && exit 1); \
echo "$(GREEN)✓ SwiftGodot cloned$(NC)"; \
else \
echo "$(GREEN)✓ SwiftGodot already exists$(NC)"; \
fi
@echo "$(GREEN)Installing git hooks...$(NC)"
@$(PROJECT_ROOT)/scripts/install-hooks.sh
@echo "$(GREEN)Setup complete!$(NC)"
Expand Down Expand Up @@ -120,6 +129,18 @@ macos-build:
android: setup gradle-wrapper
@echo "$(GREEN)Building Android plugin...$(NC)"
@cd $(ANDROID_DIR) && ./gradlew copyReleaseAarToAddons
@echo "$(GREEN)Generating GDAP file...$(NC)"
@OPENIAP_VERSION=$$(python3 -c "import json; print(json.load(open('$(PROJECT_ROOT)/openiap-versions.json'))['google'])"); \
printf '%s\n' \
'[config]' \
'name="GodotIap"' \
'binary_type="local"' \
'binary="GodotIap.release.aar"' \
'' \
'[dependencies]' \
'local=[]' \
"remote=[\"com.android.billingclient:billing:7.1.1\", \"io.github.hyochan.openiap:openiap-google:$$OPENIAP_VERSION\"]" \
> $(ADDON_DIR)/android/GodotIap.gdap
@echo "$(GREEN)✓ Android plugin built$(NC)"
@echo "Output: $(ADDON_DIR)/android/"
@ls -la $(ADDON_DIR)/android/*.aar 2>/dev/null || echo " (AAR files will appear after successful build)"
Expand Down
Binary file added addons/godot-iap/android/GodotIap.debug.aar
Binary file not shown.
8 changes: 8 additions & 0 deletions addons/godot-iap/android/GodotIap.gdap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[config]
name="GodotIap"
binary_type="local"
binary="GodotIap.release.aar"

[dependencies]
local=[]
remote=["com.android.billingclient:billing:7.1.1", "io.github.hyochan.openiap:openiap-google:1.3.28"]
Binary file added addons/godot-iap/android/GodotIap.release.aar
Binary file not shown.
1 change: 1 addition & 0 deletions scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if [ -n "$VERSIONS_CHANGED" ]; then
# Stage the updated files
git add "$PROJECT_ROOT/addons/godot-iap/godot_iap_plugin.gd" 2>/dev/null
git add "$PROJECT_ROOT/Example/addons/godot-iap/godot_iap_plugin.gd" 2>/dev/null
git add "$PROJECT_ROOT/addons/godot-iap/android/GodotIap.gdap" 2>/dev/null
echo -e "${GREEN}✓ Version sync complete${NC}"
fi
echo ""
Expand Down
11 changes: 11 additions & 0 deletions scripts/sync-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,15 @@ if [ -f "$PLUGIN_FILE" ]; then
echo "Updated: Example/addons/godot-iap/godot_iap_plugin.gd"
fi

# Update GDAP file Android dependencies
GDAP_FILE="$PROJECT_ROOT/addons/godot-iap/android/GodotIap.gdap"
if [ -f "$GDAP_FILE" ]; then
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/openiap-google:[0-9.]*\"/openiap-google:$GOOGLE_VERSION\"/g" "$GDAP_FILE"
else
sed -i "s/openiap-google:[0-9.]*\"/openiap-google:$GOOGLE_VERSION\"/g" "$GDAP_FILE"
fi
echo "Updated: addons/godot-iap/android/GodotIap.gdap"
fi

echo "Version sync complete!"
Loading