Thank you for your interest in contributing! We love your input and appreciate your efforts to make OpenIAP better.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
./gradlew :openiap:test) - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone your fork
git clone https://github.com/YOUR_USERNAME/openiap-google.git
cd openiap-google
# Open in Android Studio (recommended)
./scripts/open-android-studio.sh
# Or build from CLI
./gradlew :openiap:assemble
# Run unit tests for the library module
./gradlew :openiap:test
# (Optional) Install and run the Example app
./gradlew :Example:installDebug
adb shell am start -n dev.hyo.martie/.MainActivity- All GraphQL models in
openiap/src/main/java/dev/hyo/openiap/Types.ktare generated from thehyodotdev/openiap-gqlrepository. When you update API behavior, adjust the upstream type generator first so the Kotlin output stays in sync across platforms. - The canonical workflow is documented in
CONVENTION.md. Read it before touching generated models or related helpers. - To refresh the generated file locally, run
./scripts/generate-types.sh. If you need to experiment with manual edits, you can pass--skip-download trueto reuse the currentTypes.ktwhile still applying the post-processing step, but remember that ad-hoc edits will not ship in published releases unless the upstream generator incorporates them. - For changes that require generator support, open an issue or pull request in the
openiap-gqlrepository.
- Follow the official Kotlin Coding Conventions
- Use meaningful, descriptive names for types, functions, and variables
- Keep functions small and focused
- Add comments when they clarify intent (avoid redundant comments)
- OpenIap prefix for public models (Android)
- Prefix all public model types with
OpenIap. - Examples:
OpenIapProduct,OpenIapPurchase,OpenIapActiveSubscription,OpenIapRequestPurchaseProps,OpenIapProductRequest,OpenIapReceiptValidationProps,OpenIapReceiptValidationResult.
- Prefix all public model types with
- Private/internal helper types do not need the prefix.
- When renaming existing types, provide a public typealias from the old name to the new name to preserve source compatibility and migrate usages incrementally when feasible.
All new features must include unit tests (JUnit + coroutines test):
@Test
fun yourFeature_isCorrect() = kotlinx.coroutines.test.runTest {
// Arrange
// val module = FakeOpenIapModule()
// Act
// val result = store.yourMethod()
// Assert
// assertEquals(expected, result)
}Run tests locally with:
./gradlew :openiap:test- Write clear PR titles and descriptions
- Include tests for new features
- Update documentation when needed
- Keep changes focused and small
- Mix unrelated changes in one PR
- Break existing tests
- Change code style without discussion
- Include commented-out or dead code
Keep them clear and concise:
Add purchase error recoveryFix subscription status checkUpdate Google Play Billing integrationRefactor transaction handling
Feel free to:
- Open an issue for bugs or features
- Start a discussion for questions
- Tag @chan for urgent matters
By contributing, you agree that your contributions will be licensed under the MIT License.