Skip to content
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
36 changes: 11 additions & 25 deletions .github/workflows/ci-gemini-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
issue_comment:
types: [created]

# Ensure only one run per-issue at a time and avoid duplicates
concurrency:
group: ci-gemini-pr-${{ github.event.issue.number }}
cancel-in-progress: true
Expand All @@ -16,6 +15,7 @@ permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
analyze-and-pr:
Expand Down Expand Up @@ -46,7 +46,12 @@ jobs:
id: analyze-pr
uses: google-github-actions/run-gemini-cli@v0
timeout-minutes: 20
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Code Assist settings
use_gemini_code_assist: true
gemini_model: "gemini-2.5-pro"
prompt: |
You are an expert Flutter developer helping with the flutter_inapp_purchase package.

Expand Down Expand Up @@ -91,36 +96,17 @@ jobs:
settings: |
{
"tools": [
{
"name": "gh",
"description": "GitHub CLI for creating branches and PRs"
},
{
"name": "git",
"description": "Git commands for version control"
},
{
"name": "flutter",
"description": "Flutter CLI for testing and analysis"
},
{
"name": "dart",
"description": "Dart CLI for formatting and analysis"
}
{ "name": "gh", "description": "GitHub CLI for creating branches and PRs" },
{ "name": "git", "description": "Git commands for version control" },
{ "name": "flutter", "description": "Flutter CLI for testing and analysis" },
{ "name": "dart", "description": "Dart CLI for formatting and analysis" }
],
"repositories": [
{
"path": ".",
"instructions": "Refer to CLAUDE.md for conventions. Keep changes minimal, add tests, and follow pre-commit checks."
}
{ "path": ".", "instructions": "Refer to CLAUDE.md for conventions. Keep changes minimal, add tests, and follow pre-commit checks." }
],
"model": "gemini-1.5-flash"
}

gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Comment on issue with result
if: always()
uses: actions/github-script@v7
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ jobs:

- run: flutter pub get

- run: dart format --page-width 80 --trailing-commas automate --output=none --set-exit-if-changed .
- name: Check formatting (excluding generated files)
shell: bash
run: |
set -euo pipefail
files=$(git ls-files '*.dart' | grep -Ev '^lib/types\.dart$|\.g\.dart$|\.freezed\.dart$' || true)
if [[ -z "$files" ]]; then
exit 0
fi
printf '%s\n' "$files" | xargs dart format --page-width 80 --output=none --set-exit-if-changed

# - run: flutter analyze .

Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.pub/
pubspec.lock

.build/
build/
.claude/

Expand Down Expand Up @@ -38,4 +39,4 @@ docs/node_modules/

# Android build artifacts
example/android/app/.cxx/
*.cxx/
*.cxx/
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

// Dart & Flutter settings
"dart.flutterSdkPath": null,
"dart.doNotFormat": [
"lib/types.dart"
],
"[dart]": {
"editor.rulers": [80],
"editor.selectionHighlight": false,
Expand Down Expand Up @@ -62,5 +65,5 @@
// Docusaurus specific
"typescript.tsdk": "docs/node_modules/typescript/lib",
"npm.packageManager": "npm",
"cSpell.words": ["inapp", "Inapp"]
"cSpell.words": ["inapp", "Inapp", "skus"]
}
1 change: 1 addition & 0 deletions AGENTS.md
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 6.7.0

- fix(android): honor subscription offerToken
- refactor: align [email protected] https://github.com/hyodotdev/openiap-gql/releases/tag/1.0.2
- migration: integrate `[email protected]`
- migration: integrate `[email protected]`

## 6.6.1

### Fixed
Expand Down
18 changes: 15 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ final allPurchases = await iap.getAvailablePurchases(

## Flutter-Specific Guidelines

### Generated Files

- `lib/types.dart` is generated from the OpenIAP schema. Never edit it by hand.
- Always regenerate via `./scripts/generate-type.sh` so the file stays in sync with the upstream `openiap-dart` package.
- If the generation script fails, fix the script or the upstream source instead of patching the output manually.

### Documentation Style

- **Avoid using emojis** in documentation, especially in headings
Expand All @@ -53,9 +59,9 @@ final allPurchases = await iap.getAvailablePurchases(

Before committing any changes, run these commands in order and ensure ALL pass:

1. **Format check**: `dart format --set-exit-if-changed .`
- This will fail if any files need formatting (exit code 1)
- If it fails, run `dart format .` to fix formatting, then retry
1. **Format check**: `git ls-files '*.dart' | grep -v '^lib/types.dart$' | xargs dart format --page-width 80 --output=none --set-exit-if-changed`
- This matches the CI formatter and skips the generated `lib/types.dart`
- If it fails, run the same command without `--set-exit-if-changed` (or drop the `--output` flag) to auto-format, then retry
- Always format code before committing to maintain consistent style
2. **Lint check**: `flutter analyze`
- Fix any lint issues before committing
Expand All @@ -65,6 +71,12 @@ Before committing any changes, run these commands in order and ensure ALL pass:
4. **Final verification**: Re-run `dart format --set-exit-if-changed .` to confirm no formatting issues
5. Only commit if ALL checks succeed with exit code 0

### Commit Message Convention

- Follow the Angular commit style: `<type>: <short summary>` (50 characters max).
- Use lowercase `type` (e.g., `feat`, `fix`, `docs`, `chore`, `test`).
- Keep the summary concise and descriptive; avoid punctuation at the end.

**Important**:
- Use `--set-exit-if-changed` flag to match CI behavior and catch formatting issues locally before they cause CI failures
- When using generic functions like `showModalBottomSheet`, always specify explicit type arguments (e.g., `showModalBottomSheet<void>`) to avoid type inference errors
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ flutter run
By default, this plugin depends on the published artifact:

```
implementation "io.github.hyochan.openiap:openiap-google:1.1.0"
implementation "io.github.hyochan.openiap:openiap-google:1.1.11"
```

If you need to debug against a local checkout of the OpenIAP Android module:
Expand All @@ -127,17 +127,17 @@ If you need to debug against a local checkout of the OpenIAP Android module:
Edit `android/build.gradle` dependencies to use the local project in debug only:

```
// implementation "io.github.hyochan.openiap:openiap-google:1.1.0"
// implementation "io.github.hyochan.openiap:openiap-google:1.1.11"
debugImplementation project(":openiap")
releaseImplementation "io.github.hyochan.openiap:openiap-google:1.1.0"
releaseImplementation "io.github.hyochan.openiap:openiap-google:1.1.11"
```

4. Sync and run

Run a Gradle sync from Android Studio or rebuild the Flutter module.

To revert, comment out the include lines in `settings.gradle` and restore the single
`implementation "io.github.hyochan.openiap:openiap-google:1.1.0"` line in `android/build.gradle`.
`implementation "io.github.hyochan.openiap:openiap-google:1.1.11"` line in `android/build.gradle`.

### 5. Commit Your Changes

Expand Down
106 changes: 0 additions & 106 deletions GEMINI.md

This file was deleted.

8 changes: 6 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include: package:flutter_lints/flutter.yaml
# Local copy of flutter_lints 3.0.2 to avoid package resolution issues in CI.
include: tool/lints/flutter.yaml

linter:
rules:
Expand Down Expand Up @@ -31,7 +32,10 @@ linter:
- use_rethrow_when_possible

analyzer:
exclude:
- lib/types.dart
- example/**
language:
strict-casts: true
strict-inference: true
strict-raw-types: true
strict-raw-types: true
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ android {

dependencies {
// OpenIAP Google billing wrapper (1.1.0) includes Google Play Billing
implementation "io.github.hyochan.openiap:openiap-google:1.1.0"
implementation "io.github.hyochan.openiap:openiap-google:1.1.11"

// For local debugging with a checked-out module, you can switch to:
// debugImplementation project(":openiap")
Expand Down
Loading