Skip to content

Commit e2c025c

Browse files
committed
chore: update contributing
1 parent b094f9d commit e2c025c

File tree

3 files changed

+180
-0
lines changed

3 files changed

+180
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
### Migration Guide
2929

3030
If you're upgrading from 6.0.x and were using any deprecated methods:
31+
3132
- Replace `initialize()` with `initConnection()`
3233
- Replace `acknowledgePurchaseAndroid()` with `finishTransaction()`
3334
- Use `requestPurchase()` with proper RequestPurchase objects instead of platform-specific methods

CLAUDE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Implementation Guidelines
2+
3+
## Flutter-Specific Guidelines
4+
5+
### Pre-Commit Checks
6+
7+
Before committing any changes:
8+
9+
1. Run `dart format .` to ensure consistent code formatting
10+
2. Run `flutter test` to verify all tests pass
11+
3. Only commit if both checks succeed
12+
13+
### Platform-Specific Naming Conventions
14+
15+
- **iOS-related code**: Use `IOS` suffix (e.g., `PurchaseIOS`, `SubscriptionOfferIOS`)
16+
- When iOS is not the final suffix, use `Ios` (e.g., `IosManager`, `IosHelper`)
17+
- **Android-related code**: Use `Android` suffix (e.g., `PurchaseAndroid`, `SubscriptionOfferAndroid`)
18+
- **IAP-related code**: When IAP is not the final suffix, use `Iap` (e.g., `IapPurchase`, not `IAPPurchase`)
19+
- This applies to both functions and types
20+
21+
### API Method Naming
22+
23+
- Functions that depend on event results should use `request` prefix (e.g., `requestPurchase`, `requestSubscription`)
24+
- Follow OpenIAP terminology: <https://www.openiap.dev/docs/apis#terminology>
25+
- Do not use generic prefixes like `get`, `find` - refer to the official terminology
26+
27+
## IAP-Specific Guidelines
28+
29+
### OpenIAP Specification
30+
31+
All implementations must follow the OpenIAP specification:
32+
33+
- **APIs**: <https://www.openiap.dev/docs/apis>
34+
- **Types**: <https://www.openiap.dev/docs/types>
35+
- **Events**: <https://www.openiap.dev/docs/events>
36+
- **Errors**: <https://www.openiap.dev/docs/errors>
37+
38+
### Feature Development Process
39+
40+
For new feature proposals:
41+
42+
1. Before implementing, discuss at: <https://github.com/hyochan/openiap.dev/discussions>
43+
2. Get community feedback and consensus
44+
3. Ensure alignment with OpenIAP standards
45+
4. Implement following the agreed specification

CONTRIBUTING.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
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

Comments
 (0)