Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Tue, 02 Jun 2026 12:31:18 +0000 Subject: [pgjdbc/pgjdbc] PR #4138: build: pin grgit to 4.1.1 so the build can configure List-Id: X-GitHub-Additions: 14 X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Base: release/42.4.x X-GitHub-Changed-Files: 1 X-GitHub-Commits: 1 X-GitHub-Deletions: 0 X-GitHub-Head-Branch: codex/pin-grgit-42.4 X-GitHub-Head-SHA: 906b822d64e6f2ba0ef01add09722f902b9bfdb8 X-GitHub-Issue: 4138 X-GitHub-Labels: chore X-GitHub-Merge-SHA: 770983f8035aeaad24a6d2c13254390138042c0c X-GitHub-Merged-By: vlsi X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/4138 Content-Type: text/plain; charset=utf-8 ## What Backport of 67dd0eea7e1b7d04776744bade1395ebb096d8fd (already on `release/42.3.x`) to `release/42.4.x`. Add a `buildscript` block to `build.gradle.kts` that forces any `org.ajoberstar.grgit` dependency on the build classpath to `4.1.1`. ## Why The `com.github.vlsi.stage-vote-release` plugin pulls `org.ajoberstar.grgit:grgit-gradle:4.0.1`, which needs `grgit-core:4.0.1`. Both 4.0.x artifacts were published to JCenter only and are gone from Maven Central, so project configuration fails with `Could not find org.ajoberstar.grgit:grgit-core:4.0.1`. 4.1.1 is the oldest 4.x release still on Maven Central, so pinning to it keeps the plugin behaviour unchanged while letting the build resolve. ## How to verify With a JDK that suits the 42.4 toolchain (e.g. Java 11): ``` ./gradlew :postgresql:compileJava ``` Before this change configuration fails at grgit resolution. After it the project configures and `:postgresql:compileJava` completes (verified locally, exit code 0). 🤖 Generated with [Claude Code](https://claude.com/claude-code) diff --git a/build.gradle.kts b/build.gradle.kts index 53e7f06f30..d675a076af 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,6 +15,20 @@ import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApisExtension import org.postgresql.buildtools.JavaCommentPreprocessorTask +buildscript { + // org.ajoberstar.grgit 4.0.x was published to JCenter only and is no longer + // available on Maven Central, so the stage-vote-release plugin's transitive + // grgit 4.0.1 fails to resolve. Pin grgit to 4.1.1, the oldest 4.x release + // that is still on Maven Central. + configurations.classpath { + resolutionStrategy.eachDependency { + if (requested.group == "org.ajoberstar.grgit") { + useVersion("4.1.1") + } + } + } +} + plugins { publishing // Verification