A shared library repository maintained by the Lime team.
Publishable subprojects follow the lib-* naming convention. Only these are included in the publishAll task.
Each subproject manages its own version in its gradle.properties:
# lib-limeade/gradle.properties
artifactId=limeade
version=1.0.0
description=Limeade shared libraryThe group id is defined once at the root level in gradle.properties:
# gradle.properties
group=uk.gov.account.ipv.cri.limePublished coordinates take the form: {group}:{artifactId}:{version}
Libraries are published to Maven Central. Publishing is triggered automatically on merge to main via the publish.yml GitHub Actions workflow.
The build will skip publishing any version that already exists on Maven Central. Only a version bump in the subproject's gradle.properties will result in a new artefact being published. Non-versioned changes (refactors, test updates, formatting fixes, etc.) merged to main will not produce a new release.
To publish locally for testing:
./gradlew publishAllToMavenLocalDon't forget to include mavenLocal() in the consuming projects maven repositories configuration.
-
Create the subproject directory following the
lib-*naming convention:lib-mylib/ ├── src/main/java/ ├── build.gradle └── gradle.properties -
Set the artefact id and initial version in the subproject's
gradle.properties:artifactId=mylib version=1.0.0 description=My new shared library
-
Register the subproject in the root
settings.gradle:include 'lib-limeade' include 'lib-mylib' // new lib
-
Configure the subproject build in
lib-mylib/build.gradle. Follow the pattern inlib-limeade/build.gradle. Apply the required plugins, declare dependencies fromlibs.versions.toml, and apply any publishing configuration inherited from the root.
The root build.gradle automatically picks up any lib-* subproject and includes it in publishAll.
All shared build logic is managed at the root build.gradle. Subproject builds only define what is specific to that module (plugins, dependencies).
Requirements:
- Java 21 (Amazon Corretto) — see
.sdkmanrc - Gradle 9 (via wrapper — use
./gradlew)
Run checks locally:
./gradlew spotlessCheck unitTestCodeCoverageReport