Skip to main content

Gradle

For Gradle the main steps are:

  • Add the runtime dependency with implementation()
  • Configure the annotation processor using annotationProcessor()
  • Register properties files with the annotation processor to re-process files on changes

JDK only

The library is added for both runtime (implementation) and annotation processing annotationProcessor.

The runtime library is added using implementation entry the the annotation processor with annotationProcessor

build.gradle.kts
dependencies {
implementation("com.pinterest.l10nmessages:l10nmessages:1.0.5")
annotationProcessor("com.pinterest.l10nmessages:l10nmessages-proc:1.0.5")
annotationProcessor(files("src/main/resources/**/*.properties"))
}

With ICU4J

Same as "JDK only" and add the icu4j dependency to both the annotation processor and runtime dependencies

build.gradle.kts
dependencies {
implementation("com.pinterest.l10nmessages:l10nmessages:1.0.5")
implementation("com.ibm.icu:icu4j:72.1")

annotationProcessor("com.pinterest.l10nmessages:l10nmessages-proc:1.0.5")
annotationProcessor("com.ibm.icu:icu4j:72.1")
annotationProcessor(files("src/main/resources/**/*.properties"))
}