This is a development focused supplement to CONTRIBUTING.md.
Installing pre-commit hook is optional but can save you some headache when pushing unformatted code.
Installing git pre-commit hook that formats code with Ktlint:
cp scripts/git/pre-commit .git/hooks/pre-commit
Before writing a commit message read this article.
Before pushing any changes make sure project builds without errors with:
./gradlew build
This project uses Kotest for testing.
- Make sure tests clearly document new features
- Any new feature must be unit tested
Before submitting a pull request, test your changes locally on a sample project. There are few ways for local testing:
- simply use one of the sample subprojects
- or publish library to maven local repository with
./gradlew publishToMavenLocal
and use it in any project viamavenLocal()
repository
Snapshot release is triggered automatically after merge to the main branch. To use a released snapshot version make sure to register Sonatype snapshot repository in gradle with:
// build.gradle.kts
repositories {
mavenCentral()
maven {
url = URI("https://oss.sonatype.org/content/repositories/snapshots")
}
}
The snapshot version can be found in GitHub Action build log.
If change adds new feature or modifies an existing one update README and documentation.
To locally preview documentation changes follow instructions in docs/README.md