Building, testing and contributing
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Project structure
| Path | Contents |
|---|---|
|
The library: |
|
Sample app, see Sample app. |
|
This Antora documentation site. |
|
GitHub Actions workflows for CI, releases, version sync and security scans. |
Requirements
-
JDK 21 or later to run the unit tests, the same as CI. The library still targets JVM 17, but some of its transitive dependencies (pulled in by irurueta-android-glutils) are compiled for Java 21, so a JDK 17 runtime fails the tests with
UnsupportedClassVersionError. -
Android SDK with platform 36 (set
sdk.dirinlocal.propertiesor theANDROID_HOMEenvironment variable). -
An emulator or device for instrumented tests.
Building
./gradlew assembleDebug # build library and sample app
./gradlew :lib:assembleRelease # build the release AAR
Testing
./gradlew test # JVM unit tests (Robolectric)
./gradlew connectedAndroidTest # instrumented tests, requires a device or emulator
./gradlew lint # Android Lint
Unit test coverage is collected because enableUnitTestCoverage is enabled for debug builds. CI converts it to a
JaCoCo XML report and sends it to SonarCloud.
API documentation
./gradlew :lib:dokkaGenerate
The KDoc HTML is generated in lib/build/dokka/html and published under /api/ on GitHub Pages.
Documentation site
This site is built with Antora (Node.js 20 or later):
cd docs
npm ci
npx antora antora-playbook.yml
npx pagefind --site build/site
The result is in docs/build/site. Search only works when it is served over HTTP, for instance with
python3 -m http.server 8090 --directory docs/build/site.
Branching model
The repository follows gitflow:
-
developis the integration branch. It carries a-SNAPSHOTversion, and every push builds, tests, publishes a snapshot to Maven Central and deploys the documentation. -
mainonly receives releases. Publishing a GitHub release frommainbuilds and publishes the release to Maven Central, deploys the documentation, and opens a pull request that mergesmainback intodevelopwith the next-SNAPSHOTversion. -
Features are developed in
feature/<issue>-<name>branches created fromdevelop, and hotfixes inhotfix/…branches created frommain.