Thank you for your interest in contributing to SDKForge! This document provides guidelines and information for contributors.
- Getting Started
- Development Setup
- Project Structure
- Code Style
- Testing
- Pull Request Process
- Reporting Issues
- Code of Conduct
Before contributing, please:
- Fork the repository
- Create a branch from
main(see Branch Naming) - Set up your development environment
- Make your changes
- Test your changes
- Submit a pull request (see Pull Request Guidelines)
- Java Development Kit (JDK): Version 21 or higher
- Android Studio: Latest stable version (for Android development)
- Xcode: Latest stable version (for iOS development, macOS only)
- Kotlin: Version 1.9.0 or higher
- Gradle: Version 8.0 or higher
-
Clone the repository:
git clone https://github.com/SDKForge/template-sdk.git SDKForgeTemplate or git clone git@github.com:SDKForge/template-sdk.git SDKForgeTemplate cd SDKForgeTemplate -
Build the project:
./gradlew build
-
Run tests:
./gradlew lint ktlintCheck dependencyGuard checkLegacyAbi
This is a Kotlin Multiplatform project with the following structure:
SDKForge.Template/
├── app-android/ # Android sample application
├── app-ios/ # iOS sample application
├── app-shared/ # Shared sample UI components (Compose Multiplatform)
├── shared/ # Library with all components
├── shared-core/ # Core shared functionality
├── shared-template/ # Template for shared modules
├── build-logic/ # Gradle build logic
├── internal-benchmark/ # Performance benchmarks
└── internal-ktlint/ # Custom ktlint rules
- Shared modules (
shared*): Should be platform-agnostic and reusable - App modules (
app*): Platform-specific implementations - Internal modules (
internal*): Build tools and utilities
Use the following format for branch names:
[branch type]/[ticket id]-[ticket name]
Branch Types:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Adding or updating testschore/- Maintenance tasks
Examples:
feature/7-ktlint-rules-for-imports
fix/12-crash-on-android-12
docs/5-update-api-documentation
refactor/8-improve-error-handling
Use the following format for commit messages:
#[ticket id]: ticket name
- changes purpose #1
- changes purpose #2
Examples:
#7: ktlint rules for proper structure model imports
- fixed ktlint issues
- added unit tests
#12: crash on Android 12
- fixed platform-specific code
- updated minimum SDK version
- added regression tests
Use the same format as commit messages for PR titles:
#[ticket id]: ticket name
Example:
#7: ktlint rules for proper structure model imports
We follow the Kotlin Coding Conventions and use ktlint for code formatting.
-
Automatic formatting:
./gradlew ktlintFormat
-
Check formatting:
./gradlew ktlintCheck
- Files: Use PascalCase for class names, camelCase for functions and variables
- Packages: Use lowercase with dots (e.g.,
com.sdkforge.template) - Constants: Use UPPER_SNAKE_CASE
- Functions: Use camelCase, descriptive names
- Use KDoc for public APIs
- Include examples for complex functions
- Document platform-specific behavior
- Keep documentation up-to-date with code changes
# Run all tests
./gradlew test
# Run tests for specific module
./gradlew :shared-core:test
# Run tests with coverage
./gradlew koverReport- Write unit tests for all public APIs
- Use descriptive test names
- Follow AAA pattern (Arrange, Act, Assert)
- Mock external dependencies
- Test both success and failure scenarios
-
Ensure code quality:
- All tests pass
- Code is formatted (ktlint passes)
- No linting errors
- Documentation is updated
-
Check compatibility:
- Works on all target platforms
- No breaking changes (unless documented)
- Backward compatibility maintained
-
Update documentation:
- README.md if needed
- API documentation
- Migration guides for breaking changes
-
Title: Use the ticket-based format
#[ticket id]: ticket nameExample:
#7: ktlint rules for proper structure model imports -
Description: Include:
- What changes were made
- Why changes were made
- How to test the changes
- Any breaking changes
- List of changes (using the same format as commit messages):
- change purpose #1 - change purpose #2
-
Labels: Add appropriate labels:
enhancementfor new featuresbugfor bug fixesdocumentationfor docsbreaking-changefor breaking changes
-
Automated checks must pass:
- Build verification
- Test execution
- Code quality checks
- Dependency updates
-
Code review:
- At least one maintainer approval required
- Address all review comments
- Resolve conflicts if any
When reporting bugs, please include:
-
Environment details:
- Operating system
- Kotlin version
- Gradle version
- Target platform (Android/iOS)
-
Steps to reproduce:
- Clear, step-by-step instructions
- Sample code if applicable
- Expected vs actual behavior
-
Additional information:
- Stack traces
- Logs
- Screenshots (for UI issues)
For feature requests:
-
Describe the feature:
- What it should do
- Why it's needed
- Use cases
-
Consider implementation:
- Platform compatibility
- Performance impact
- Backward compatibility
We are committed to providing a welcoming and inspiring community for all. Please:
- Be respectful and inclusive
- Use welcoming and inclusive language
- Be collaborative and constructive
- Focus on what is best for the community
- Show empathy towards other community members
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated promptly and fairly.
By contributing to SDKForge, you agree that your contributions will be licensed under the MIT License.
If you need help with contributing:
- Check existing issues and pull requests
- Read the documentation in the
docs/folder - Ask questions in GitHub Discussions
- Join our community channels (if available)
Thank you for contributing to SDKForge!