Thank you for your interest in contributing! This guide will help you get started with development and submitting your contributions.
git clone https://github.com/hyochan/flutter_inapp_purchase.git
cd flutter_inapp_purchaseflutter pub get- This plugin uses the OpenIAP Apple native module via CocoaPods. See openiap-versions.json for the current version.
- After upgrading or cloning, run
pod installin your iOS project (e.g.,example/ios). - Minimum iOS deployment target is
15.0for StoreKit 2 support.
- This plugin uses the OpenIAP Google native module. See openiap-versions.json for the current version.
- The module is automatically fetched from Maven Central during build.
This repo ships with Git hooks under .githooks that auto-format, analyze, and test your changes before committing. Enable them once per clone:
git config core.hooksPath .githooksAfter this, committing will:
- Run
flutter pub get - Auto-format staged Dart files
- Verify repo-wide formatting (same as CI)
- Run
flutter analyze(non-blocking by default) - Run
flutter test
Hook options (env vars):
SKIP_PRECOMMIT_TESTS=1to skip testsPRECOMMIT_TEST_CONCURRENCY=<N>to control concurrency (default 4)PRECOMMIT_FAIL_FAST=0to disable--fail-fastPRECOMMIT_RUN_ALL_TESTS=0to only run changed testsENFORCE_ANALYZE=1to fail on analyzer warnings
Navigate to the example directory and run the app:
cd example
flutter pub get
# For iOS
flutter run --dart-define=IOS_PRODUCTS="your_product_ids"
# For Android
flutter run --dart-define=ANDROID_PRODUCTS="your_product_ids"Note: You'll need to configure your app with valid product IDs from your App Store Connect or Google Play Console.
-
Go to https://github.com/hyochan/flutter_inapp_purchase
-
Click the "Fork" button in the top-right corner
-
Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/flutter_inapp_purchase.git cd flutter_inapp_purchase
git checkout -b feature/your-feature-name- Write your code following the project conventions
- Add tests for new functionality
- Update documentation as needed
# Format your code
dart format .
# Run tests
flutter test
# Run the example app to verify functionality
cd example
flutter runBy default, this plugin depends on the published artifact:
implementation "io.github.hyochan.openiap:openiap-google:1.1.12"
If you need to debug against a local checkout of the OpenIAP Android module:
-
Clone the module
git clone https://github.com/hyodotdev/openiap-google -
Point Gradle to the local module (uncomment/edit paths)
Edit
android/settings.gradleand uncomment the lines, updating the path:include ':openiap' project(':openiap').projectDir = new File('/Users/you/path/to/openiap-google/openiap') -
Switch the dependency for debug builds
Edit
android/build.gradledependencies to use the local project in debug only:// implementation "io.github.hyochan.openiap:openiap-google:1.1.12" debugImplementation project(":openiap") releaseImplementation "io.github.hyochan.openiap:openiap-google:1.1.12" -
Sync and run
Run a Gradle sync from Android Studio or rebuild the Flutter module.
To revert, comment out the include lines in
settings.gradleand restore the singleimplementation "io.github.hyochan.openiap:openiap-google:1.1.12"line inandroid/build.gradle.
git add .
git commit -m "feat: add your feature description"Follow conventional commit messages:
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringtest:for test additions/changeschore:for maintenance tasks
git push origin feature/your-feature-name- Go to your fork on GitHub
- Click "Pull request" button
- Select your branch and target
mainbranch of the original repository - Fill in the PR template with:
- Description of changes
- Related issue number (if applicable)
- Testing performed
- Submit the pull request
Please refer to CLAUDE.md for:
- Naming conventions
- Platform-specific guidelines
- API method naming
- OpenIAP specification compliance
- Code is formatted with
dart format . - All tests pass with
flutter test - Example app runs without errors
- Documentation is updated if needed
- Commit messages follow conventional format
- For new feature proposals, start a discussion at: https://github.com/hyochan/openiap.dev/discussions
- For bugs, open an issue with a clear description and reproduction steps
- For questions, feel free to open a discussion
Thank you for contributing!