Building, testing and contributing

This documentation was generated with the assistance of AI. Please report any inaccuracies.

Prerequisites

  • JDK 21 or later (the hermes dependency 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.properties at it with sdk.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

lib/

The library (RecyclerViewManager), published to Maven Central.

app/

The sample app.

docs/

This Antora documentation site.

.github/workflows/

CI, release, version-sync and security workflows.

Building

./gradlew assembleDebug

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:

  • develop is the integration branch. Feature and fix branches are opened against it, and its version carries a -SNAPSHOT suffix.

  • main only receives releases. Merging a release into main builds, 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 develop with the next development version.

Contributing

  1. Fork the repository and create a branch from develop.

  2. Make your change with tests. Keep the Apache 2.0 license header on new source files.

  3. Run ./gradlew :lib:testDebugUnitTest lint locally.

  4. Open a pull request against develop.

Bug reports and feature requests are welcome in the issue tracker.