diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0427bc8..fecd74b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ on: workflow_dispatch: env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' jobs: @@ -14,16 +14,16 @@ jobs: outputs: release-version: ${{ steps.version-step.outputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v6 - name: Get DDI-Lifecycle lib version id: version-step @@ -55,10 +55,10 @@ jobs: needs: check-version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} @@ -86,10 +86,10 @@ jobs: needs: [check-version, publish] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Create GitHub release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v3 with: tag_name: ${{ needs.check-version.outputs.release-version }} target_commitish: ${{ github.head_ref || github.ref }} diff --git a/.github/workflows/snapshot.yaml b/.github/workflows/snapshot.yaml index ae999c8..0526bcf 100644 --- a/.github/workflows/snapshot.yaml +++ b/.github/workflows/snapshot.yaml @@ -5,7 +5,7 @@ on: types: [labeled] env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' jobs: @@ -15,10 +15,10 @@ jobs: outputs: snapshot-version: ${{ steps.version-step.outputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} @@ -58,16 +58,16 @@ jobs: needs: check-version runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v6 - name: Publish DDI Lifecycle lib on Maven Central run: | @@ -80,7 +80,7 @@ jobs: needs: [check-version, publish-snapshot] runs-on: ubuntu-latest steps: - - uses: actions/github-script@v7 + - uses: actions/github-script@v9 with: script: | github.rest.issues.createComment({ @@ -95,7 +95,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Create tag - uses: actions/github-script@v7 + uses: actions/github-script@v9 with: script: | github.rest.git.createRef({ @@ -108,7 +108,7 @@ jobs: remove-publish-label: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: actions-ecosystem/action-remove-labels@v1 with: labels: 'publish-snapshot' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index aece19b..e75a83f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,17 +9,17 @@ on: - 'README.md' env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' jobs: test: if: ${{ (github.event.pull_request.draft == false) && !contains(github.event.pull_request.labels.*.name, 'publish-snapshot') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup Java - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: ${{ env.JAVA_VERSION }} diff --git a/README.md b/README.md index 06e699d..824605d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This library offers deserialization / serialization for DDI objects, using metho ### Requirements -Java 17 or above. +Java 21 or above. ### [Get the dependency](https://mvnrepository.com/artifact/fr.insee.ddi/ddi-lifecycle) @@ -21,14 +21,14 @@ Maven: fr.insee.ddi ddi-lifecycle - 1.1.0 + 2.0.0 ``` Gradle: ```kotlin -implementation("fr.insee.ddi:ddi-lifecycle:1.1.0") +implementation("fr.insee.ddi:ddi-lifecycle:2.0.0") ``` ### Deserialize / serialize DDI objects diff --git a/build.gradle.kts b/build.gradle.kts index e3888e3..5b3ae88 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,10 +4,12 @@ plugins { allprojects { group = "fr.insee.ddi" - version = "1.1.1" + version = "2.0.0" } tasks.register("printVersion") { + description = "Prints the project version in console." + group = JavaBasePlugin.BUILD_TASK_NAME doLast { println(project.version) } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aaaabb3..c61a118 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/model/build.gradle.kts b/model/build.gradle.kts index 2519f3e..f594590 100644 --- a/model/build.gradle.kts +++ b/model/build.gradle.kts @@ -8,7 +8,7 @@ plugins { java { // Apply a specific Java toolchain to ease working on different environments. toolchain { - languageVersion.set(JavaLanguageVersion.of(17)) + languageVersion.set(JavaLanguageVersion.of(21)) } // Generate javadoc and sources jar for maven central publishing withJavadocJar() @@ -24,19 +24,31 @@ repositories { mavenCentral() } +val lo4jVersion = "2.25.4" +val springVersion = "7.0.6" +val junitVersion = "6.0.3" +val xmlUnitVersion = "2.11.0" +val assertJVersion = "3.27.7" + dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api("org.apache.xmlbeans:xmlbeans:5.3.0") // This dependency is used internally, and not exposed to consumers on their own compile classpath. - implementation("org.apache.logging.log4j:log4j-core:2.25.4") + implementation("org.apache.logging.log4j:log4j-core:$lo4jVersion") // - implementation("org.springframework:spring-beans:6.2.17") + implementation("org.springframework:spring-beans:$springVersion") // Use JUnit Jupiter for testing. - testImplementation("org.junit.jupiter:junit-jupiter:5.14.3") - testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.14.3") + testImplementation("org.junit.jupiter:junit-jupiter:$junitVersion") + testRuntimeOnly("org.junit.platform:junit-platform-launcher:$junitVersion") // XMLUnit - testImplementation("org.xmlunit:xmlunit-assertj3:2.11.0") + testImplementation("org.xmlunit:xmlunit-assertj3:$xmlUnitVersion") + + constraints { + testImplementation("org.assertj:assertj-core:$assertJVersion") { + because("Temporary fix for CVE in the assertj-core imported by xmlunit-assertj3.") + } + } } sourceSets { diff --git a/settings.gradle.kts b/settings.gradle.kts index 89eacae..87f8631 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,6 @@ plugins { // Apply the foojay-resolver plugin to allow automatic download of JDKs - id("org.gradle.toolchains.foojay-resolver-convention") version "0.10.0" + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } rootProject.name = "DDI-Lifecycle-Java"