Building, testing and contributing

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

Repository layout

Path Contents

lib/

The library module, published to Maven Central as com.irurueta:irurueta-android-recycler-tab-layout.

app/

Sample application that depends on lib.

docs/

This Antora documentation site. Code examples in docs/modules/ROOT/examples are copies of tagged regions of DocumentationExamplesTest.

.github/workflows/

CI and release workflows.

Requirements

  • JDK 17.

  • Android SDK with the platform set as compileSdk in lib/build.gradle.kts. Point to it from local.properties (sdk.dir=…​).

  • Node.js 20 or later, only to build the documentation.

Building and testing

# build the library and the sample app
./gradlew assembleDebug

# unit tests (Robolectric) and unit test coverage report
./gradlew :lib:testDebugUnitTest :lib:createDebugUnitTestCoverageReport

# instrumented tests (needs a device or emulator)
./gradlew connectedAndroidTest

# Android Lint
./gradlew lint

# API documentation (Dokka), written to lib/build/dokka/html
./gradlew :lib:dokkaGenerate

Building the documentation

cd docs
npm ci
npx antora antora-playbook.yml
npx pagefind --site build/site

The site is written to docs/build/site. Search only works when the site is served over HTTP, for example with python3 -m http.server 8089 --directory docs/build/site.

Branching and releases

The repository follows gitflow:

  • develop is the integration branch. Feature branches (feature/<issue>-<name>) start from develop and are merged back into it with pull requests.

  • main only receives releases. A release branch is created from develop, merged into main and tagged with the released version. CI then publishes the library to Maven Central and the documentation to GitHub Pages.

  • After a release, an automated pull request brings the release changes and the next version back into develop.

Contributing

  • Every source and test file starts with the Apache License 2.0 header used across the repository.

  • Every class, method and property has KDoc.

  • When you change a documented example, change the tagged region in DocumentationExamplesTest and the matching file in docs/modules/ROOT/examples together. The test fails when they differ.