Building, testing and contributing
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Prerequisites
-
JDK 21 or later (the
hermesdependency is compiled for Java 21). The library itself still targets JVM 17. -
Android SDK with platform 36 installed (Android Studio installs it for you). Point
local.propertiesat it withsdk.dir=…if you don’t build from Android Studio. -
Node.js 20 or later, only if you want to build this documentation site.
The Gradle wrapper is checked in, so no local Gradle installation is needed.
Project layout
| Path | Contents |
|---|---|
|
The library ( |
|
The sample app. |
|
This Antora documentation site. |
|
CI, release, version-sync and security workflows. |
Testing
Unit tests (JVM):
./gradlew :lib:testDebugUnitTest
Instrumented tests, which need a connected device or running emulator:
./gradlew connectedAndroidTest
Lint:
./gradlew lint
Coverage is enabled for debug unit tests (enableUnitTestCoverage). The JaCoCo XML report used by SonarCloud is
written under lib/build/reports/coverage/test/debug/.
API documentation
The Dokka API documentation is generated with:
./gradlew :lib:dokkaGenerate
The output is written to lib/build/dokka/html. CI publishes it under /api of this documentation site.
Building this documentation
From the docs/ directory:
npm ci
npx antora antora-playbook.yml
The site is generated in docs/build/site. See docs/README.adoc for search indexing and serving it locally.
Branching and releases
The repository follows a gitflow model:
-
developis the integration branch. Feature and fix branches are opened against it, and its version carries a-SNAPSHOTsuffix. -
mainonly receives releases. Merging a release intomainbuilds, verifies and publishes the library to Maven Central and the documentation to GitHub Pages. -
After a release, a sync workflow opens a pull request back into
developwith the next development version.
Contributing
-
Fork the repository and create a branch from
develop. -
Make your change with tests. Keep the Apache 2.0 license header on new source files.
-
Run
./gradlew :lib:testDebugUnitTest lintlocally. -
Open a pull request against
develop.
Bug reports and feature requests are welcome in the issue tracker.