Skip to content

Explicit version alignment between gradle configurations#4140

Draft
janhoy wants to merge 1 commit intoapache:mainfrom
janhoy:custom-lib-resolution
Draft

Explicit version alignment between gradle configurations#4140
janhoy wants to merge 1 commit intoapache:mainfrom
janhoy:custom-lib-resolution

Conversation

@janhoy
Copy link
Contributor

@janhoy janhoy commented Feb 16, 2026

Spinoff from #4098

With help of Claude Code, here is a custom version alignment configuration that ensures that

  1. Standard java configs use consistentResolution.useCompileClasspathVersions()
  2. Custom packaging configs (runtimeLibs, solrPlatformLibs) align with runtimeClasspath versions
  3. Validation configs (jarValidation) align runtimeClasspath versions

So this means all these will be the same:

  • compileClasspath
  • runtimeClasspath
  • testCompileClasspath
  • testRuntimeClasspath
  • runtimeLibs
  • solrPlatformLibs
  • jarValidation

Sometimes this causes an older lib version to be chosen, if compile/runtime was resolved to that version for some reason. But I believe it is better to align them all than to risk packaging different versions in tarball than what is being run in tests?

Looking at the re-generated lockfiles in the PR there is much more alignment, but still some places with a diff, such as woodstox-core in s3-repository.

Copy link
Contributor

@dsmiley dsmiley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for picking this up!

solrPlatformLibs
solrPlatformLibs {
resolutionStrategy {
preferProjectModules()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read the docs but it's not clear how this is relevant to us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants