|
| 1 | +# Contributing to Flutter InApp Purchase |
| 2 | + |
| 3 | +Thank you for your interest in contributing! This guide will help you get started with development and submitting your contributions. |
| 4 | + |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +### 1. Clone the Repository |
| 8 | + |
| 9 | +```bash |
| 10 | +git clone https://github.com/hyochan/flutter_inapp_purchase.git |
| 11 | +cd flutter_inapp_purchase |
| 12 | +``` |
| 13 | + |
| 14 | +### 2. Install Dependencies |
| 15 | + |
| 16 | +```bash |
| 17 | +flutter pub get |
| 18 | +``` |
| 19 | + |
| 20 | +### 3. Run the Example App |
| 21 | + |
| 22 | +Navigate to the example directory and run the app: |
| 23 | + |
| 24 | +```bash |
| 25 | +cd example |
| 26 | +flutter pub get |
| 27 | + |
| 28 | +# For iOS |
| 29 | +flutter run --dart-define=IOS_PRODUCTS="your_product_ids" |
| 30 | + |
| 31 | +# For Android |
| 32 | +flutter run --dart-define=ANDROID_PRODUCTS="your_product_ids" |
| 33 | +``` |
| 34 | + |
| 35 | +**Note:** You'll need to configure your app with valid product IDs from your App Store Connect or Google Play Console. |
| 36 | + |
| 37 | +## Making Changes |
| 38 | + |
| 39 | +### 1. Fork the Repository |
| 40 | + |
| 41 | +1. Go to <https://github.com/hyochan/flutter_inapp_purchase> |
| 42 | +2. Click the "Fork" button in the top-right corner |
| 43 | +3. Clone your fork locally: |
| 44 | + |
| 45 | + ```sh |
| 46 | + git clone https://github.com/YOUR_USERNAME/flutter_inapp_purchase.git |
| 47 | + cd flutter_inapp_purchase |
| 48 | + ``` |
| 49 | + |
| 50 | +### 2. Create a Feature Branch |
| 51 | + |
| 52 | +```bash |
| 53 | +git checkout -b feature/your-feature-name |
| 54 | +``` |
| 55 | + |
| 56 | +### 3. Make Your Changes |
| 57 | + |
| 58 | +- Write your code following the project conventions |
| 59 | +- Add tests for new functionality |
| 60 | +- Update documentation as needed |
| 61 | + |
| 62 | +### 4. Test Your Changes |
| 63 | + |
| 64 | +```bash |
| 65 | +# Format your code |
| 66 | +dart format . |
| 67 | + |
| 68 | +# Run tests |
| 69 | +flutter test |
| 70 | + |
| 71 | +# Run the example app to verify functionality |
| 72 | +cd example |
| 73 | +flutter run |
| 74 | +``` |
| 75 | + |
| 76 | +### 5. Commit Your Changes |
| 77 | + |
| 78 | +```bash |
| 79 | +git add . |
| 80 | +git commit -m "feat: add your feature description" |
| 81 | +``` |
| 82 | + |
| 83 | +Follow conventional commit messages: |
| 84 | + |
| 85 | +- `feat:` for new features |
| 86 | +- `fix:` for bug fixes |
| 87 | +- `docs:` for documentation changes |
| 88 | +- `refactor:` for code refactoring |
| 89 | +- `test:` for test additions/changes |
| 90 | +- `chore:` for maintenance tasks |
| 91 | + |
| 92 | +### 6. Push to Your Fork |
| 93 | + |
| 94 | +```bash |
| 95 | +git push origin feature/your-feature-name |
| 96 | +``` |
| 97 | + |
| 98 | +### 7. Create a Pull Request |
| 99 | + |
| 100 | +1. Go to your fork on GitHub |
| 101 | +2. Click "Pull request" button |
| 102 | +3. Select your branch and target `main` branch of the original repository |
| 103 | +4. Fill in the PR template with: |
| 104 | + - Description of changes |
| 105 | + - Related issue number (if applicable) |
| 106 | + - Testing performed |
| 107 | +5. Submit the pull request |
| 108 | + |
| 109 | +## Development Guidelines |
| 110 | + |
| 111 | +### Coding Standards |
| 112 | + |
| 113 | +Please refer to [CLAUDE.md](./CLAUDE.md) for: |
| 114 | + |
| 115 | +- Naming conventions |
| 116 | +- Platform-specific guidelines |
| 117 | +- API method naming |
| 118 | +- OpenIAP specification compliance |
| 119 | + |
| 120 | +### Before Submitting |
| 121 | + |
| 122 | +- [ ] Code is formatted with `dart format .` |
| 123 | +- [ ] All tests pass with `flutter test` |
| 124 | +- [ ] Example app runs without errors |
| 125 | +- [ ] Documentation is updated if needed |
| 126 | +- [ ] Commit messages follow conventional format |
| 127 | + |
| 128 | +## Questions or Issues? |
| 129 | + |
| 130 | +- For new feature proposals, start a discussion at: <https://github.com/hyochan/openiap.dev/discussions> |
| 131 | +- For bugs, open an issue with a clear description and reproduction steps |
| 132 | +- For questions, feel free to open a discussion |
| 133 | + |
| 134 | +Thank you for contributing! |
0 commit comments