From 4de46f36c27e2b95a9e09509742a1d0189ca8568 Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Thu, 30 May 2024 20:24:03 +0200 Subject: [PATCH 1/9] Switch to snapshot version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ea36257..4063ae2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ description = Serialize and deserialize Result objects with Micronaut group = com.leakyabstractions artifactName = Micronaut Serialization for Result artifactId = result-micronaut-serde -version = 0.1.0.0 +version = 0.1.1.0-SNAPSHOT previousVersion = 0.1.0.0 homepage = https://dev.leakyabstractions.com/result-micronaut-serde/ From 52ba74af3569c5ae48f39597676178c7d33cc117 Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Sat, 1 Jun 2024 12:43:56 +0200 Subject: [PATCH 2/9] Update badge.json --- badge.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badge.json b/badge.json index 4ba456c..b75077a 100644 --- a/badge.json +++ b/badge.json @@ -5,7 +5,7 @@ "style": "flat", "labelColor": "fff", "color": "light-green", - "label": "Result", + "label": "result-micronaut-serde", "message": "{{ site.current_version }}", "logoSvg": "" } \ No newline at end of file From bdcefefe4cd29ad8c331feaa1618feebd1469cab Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Sat, 1 Jun 2024 12:44:56 +0200 Subject: [PATCH 3/9] Exclude api-compatibility dependencies from dependency graph --- .github/workflows/dependencies.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index ad3609f..499ff09 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -40,5 +40,7 @@ jobs: - name: Generate and submit dependency graph uses: gradle/actions/dependency-submission@v3 env: + # Exclude all dependencies that originate solely in the 'api-compatibility' project + DEPENDENCY_GRAPH_EXCLUDE_PROJECTS: ':api-compatibility' # Exclude dependencies that are only resolved in test classpaths DEPENDENCY_GRAPH_EXCLUDE_CONFIGURATIONS: '.*[Tt]est(Compile|Runtime)Classpath' From 5d049cead18587dc6c9daf593f4d6d1718ba554b Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Sat, 1 Jun 2024 12:45:39 +0200 Subject: [PATCH 4/9] Truncate compatibility report if size is greater than 1024k --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30160ca..f1f3b2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,7 +101,8 @@ jobs: # ================================ - name: Compatibility with version ${{ steps.properties.outputs.previousVersion }} if: ${{ matrix.jdk == 21 }} - run: cat ./api-compatibility/build/report.txt >> $GITHUB_STEP_SUMMARY + # $GITHUB_STEP_SUMMARY supports content up to a size of 1024k + run: head -c 1MiB ./api-compatibility/build/report.txt >> $GITHUB_STEP_SUMMARY # ================================ # CACHE SONARCLOUD PACKAGES From b913c760a002ab73c75f18695788b779ee9b8efe Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Sat, 1 Jun 2024 12:50:05 +0200 Subject: [PATCH 5/9] Update Gradle Wrapper to version 8.8 --- gradle/wrapper/gradle-wrapper.properties | 4 ++-- gradlew | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 381baa9..8a1f6b9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=544c35d6bd849ae8a5ed0bcea39ba677dc40f49df7d1835561582da2009b961d -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionSha256Sum=a4b4158601f8636cdeeab09bd76afb640030bb5b144aafe261a5e8af027dc612 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..b740cf1 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. From 23bb52e62c53d1b7d3100d98d8e60e67e99858b6 Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Sat, 1 Jun 2024 13:00:59 +0200 Subject: [PATCH 6/9] Upgrade JDK to version 17 for GitHub action update-gradle-wrapper ``` A problem occurred configuring root project 'result-micronaut-serde-root'. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve io.micronaut.gradle:micronaut-gradle-plugin:4.4.0. Required by: project : > io.micronaut.library:io.micronaut.library.gradle.plugin:4.4.0 > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM. > Could not resolve io.micronaut.gradle:micronaut-aot-plugin:4.4.0. Required by: project : > io.micronaut.aot:io.micronaut.aot.gradle.plugin:4.4.0 > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM. ``` --- .github/workflows/update-gradle-wrapper.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/update-gradle-wrapper.yml b/.github/workflows/update-gradle-wrapper.yml index b0c28b6..dd02cde 100644 --- a/.github/workflows/update-gradle-wrapper.yml +++ b/.github/workflows/update-gradle-wrapper.yml @@ -21,6 +21,16 @@ jobs: - name: Shallow clone uses: actions/checkout@v4 + # ================================ + # SET UP JDK + # ================================ + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-package: jdk + java-version: 17 + # ================================ # UPDATE GRADLE WRAPPER # ================================ From e4dd0e8e9d321dc5805f20b972b2db21709a713d Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Mon, 3 Jun 2024 20:38:45 +0200 Subject: [PATCH 7/9] Bump dependencies - Gradle plugin japicmp version 0.4.3 - result-assertj version 0.9.3.0 - result-core version 0.15.1.1 --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index af04bcb..f006874 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,13 +2,13 @@ assertj = "3.26.0" google-java-format = "1.19.2" jacoco = "0.8.10" -japicmp = "0.4.2" +japicmp = "0.4.3" junit = "5.10.2" micronaut-aot = "4.4.0" micronaut-library = "4.4.0" nexus-publish = "2.0.0" -result-assertj = "0.9.2.0" -result-core = "0.15.0.2" +result-assertj = "0.9.3.0" +result-core = "0.15.1.1" sonarqube = "5.0.0.4638" spotless = "6.25.0" From e53c4404e90daba192bd97fc9ca257d671b19834 Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Mon, 3 Jun 2024 20:39:23 +0200 Subject: [PATCH 8/9] Generate semver report --- api-compatibility/build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api-compatibility/build.gradle b/api-compatibility/build.gradle index 3c6a6d4..2153321 100644 --- a/api-compatibility/build.gradle +++ b/api-compatibility/build.gradle @@ -22,10 +22,12 @@ tasks.register("clean", Delete) { } tasks.register("check", me.champeau.gradle.japicmp.JapicmpTask) { + final semverReport= layout.buildDirectory.file('semver.txt').get().asFile final textReport = layout.buildDirectory.file('report.txt').get().asFile final htmlReport = layout.buildDirectory.file('report.html').get().asFile newClasspath.from(configurations.current) oldClasspath.from(configurations.previous) + semverOutputFile = semverReport txtOutputFile = textReport htmlOutputFile = htmlReport ignoreMissingClasses = true From d9ff45cea19347fd8b83fd2c7cf51a162dae9631 Mon Sep 17 00:00:00 2001 From: Guillermo Calvo Date: Mon, 3 Jun 2024 20:39:55 +0200 Subject: [PATCH 9/9] Add semantic versioning to job summary --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1f3b2b..c642c62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,6 +96,18 @@ jobs: - name: Check run: ./gradlew check + # ================================ + # SEMANTIC VERSIONING + # ================================ + - name: Semantic versioning + if: ${{ matrix.jdk == 21 }} + run: | + SEMVER=`cat ./api-compatibility/build/semver.txt` + BADGE="https://dev.leakyabstractions.com/result/semver-${SEMVER}.json" + URL="https://img.shields.io/endpoint?url=$BADGE" + echo "## Compatibility Report" >> $GITHUB_STEP_SUMMARY + echo "![Semantic Versioning]($URL)" >> $GITHUB_STEP_SUMMARY + # ================================ # COMPATIBILITY REPORT # ================================