From b37061b4ecf186dff31fd8ee61b91ecd5ce7697b Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Mon, 6 Jul 2026 10:54:39 +0200 Subject: [PATCH 1/3] fix(ci): Dedicated spotless config on test-publihsed-artifacts The spotless _plugin script_, is being reused in test-published-artifacts, unfortunately spotless a serilization bug on the greclipse formatter that surfaces when no files mathing extension target. This causes the build to fail with a obscure error related to fingerprinting: ``` java.lang.IllegalStateException: If the initializer was null, then one of roundtripStateInternal or equalityStateInternal should be non-null, and neither was at com.diffplug.spotless.FormatterStepSerializationRoundtrip.writeObject(...) at com.diffplug.spotless.ConfigurationCacheHackList.hashCode(...) ``` This change applies a tailored configuration for this simple project. --- test-published-dependencies/build.gradle.kts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/test-published-dependencies/build.gradle.kts b/test-published-dependencies/build.gradle.kts index e3031c4786a..ab28625153d 100644 --- a/test-published-dependencies/build.gradle.kts +++ b/test-published-dependencies/build.gradle.kts @@ -13,5 +13,22 @@ allprojects { version = versionFromFile apply(from = "$sharedConfigDirectory/repositories.gradle") - apply(from = "$sharedConfigDirectory/spotless.gradle") + apply(plugin = "com.diffplug.spotless") + + spotless { + kotlinGradle { + target("*.gradle.kts") + ktlint("1.8.0").editorConfigOverride( + mapOf( + // Disable trailing comma rules to minimize diff. + "ktlint_standard_trailing-comma-on-call-site" to "disabled", + "ktlint_standard_trailing-comma-on-declaration-site" to "disabled", + ), + ) + } + java { + target("src/**/*.java") + googleJavaFormat("1.35.0") + } + } } From 08d648d641d63543f468dd53133213419b4e86f6 Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Mon, 6 Jul 2026 11:10:11 +0200 Subject: [PATCH 2/3] fix(ci): Run `spotlessCheck` test-published-dependencies in spotless job --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5138dcae082..02750c338b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -447,7 +447,8 @@ spotless: CACHE_TYPE: "spotless" script: - ./gradlew --version - - ./gradlew spotlessCheck $GRADLE_ARGS + - ./gradlew spotlessCheck writeMainVersionFile $GRADLE_ARGS + - cd test-published-dependencies && ./gradlew spotlessCheck $GRADLE_ARGS check-instrumentation-naming: extends: .gradle_build From 65d7d51ec9df12a9082e531cfc554bd87d4cf0f7 Mon Sep 17 00:00:00 2001 From: Brice Dutheil Date: Mon, 6 Jul 2026 11:34:52 +0200 Subject: [PATCH 3/3] fix(ci): Comments --- .gitlab-ci.yml | 1 + test-published-dependencies/build.gradle.kts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 02750c338b9..2ba10349d5a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -447,6 +447,7 @@ spotless: CACHE_TYPE: "spotless" script: - ./gradlew --version + # test-published-dependencies's build file needs main version file - ./gradlew spotlessCheck writeMainVersionFile $GRADLE_ARGS - cd test-published-dependencies && ./gradlew spotlessCheck $GRADLE_ARGS diff --git a/test-published-dependencies/build.gradle.kts b/test-published-dependencies/build.gradle.kts index ab28625153d..b9e30b36bff 100644 --- a/test-published-dependencies/build.gradle.kts +++ b/test-published-dependencies/build.gradle.kts @@ -15,6 +15,9 @@ allprojects { apply(from = "$sharedConfigDirectory/repositories.gradle") apply(plugin = "com.diffplug.spotless") + // Apply a simple spotless config here. + // Using the dd-trace-java's plugin scripts, adds a step with grecplipse that + // has a concurrency bug surfacing with gradle 9.6 when there's no matching file. spotless { kotlinGradle { target("*.gradle.kts")