fix(gradle): publish sirix-core test classes via testArtifacts configuration#967
Merged
JohannesLichtenberger merged 1 commit intomainfrom May 1, 2026
Merged
Conversation
…uration
Cross-module test sharing previously used the old idiom
testImplementation project(':sirix-core').sourceSets.test.output
which broke under the Gradle 9.x toolchain in the CI Docker build with
Could not get unknown property 'sourceSets' for project ':sirix-core'
of type DefaultProjectDependency
Gradle 9+ no longer exposes the consumer Project from project(...) inside a
dependencies block. Replace the idiom with a named consumable configuration
'testArtifacts' on sirix-core that publishes a tests-classified jar, and
have sirix-kotlin-api and sirix-rest-api consume it via
testImplementation project(path: ':sirix-core', configuration: 'testArtifacts')
The testJar deliberately includes only sourceSets.test.output.classesDirs —
not the full output — because src/test/resources contains the multi-GB
cityofchicago.json benchmark dataset that would blow the zip 4 GB limit
and is not needed by downstream test consumers (they need Holder /
JsonTestHelper / IteratorTester etc., not the bench input).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores Docker Hub deploy on `main` (CI run 25207884507 failed with `Could not get unknown property 'sourceSets' for project ':sirix-core'`).
The historical idiom `project(':sirix-core').sourceSets.test.output` reaches across module boundaries through the dependencies block — Gradle 9.x stopped supporting that because `project(...)` returns a `DefaultProjectDependency`, not the actual `Project`.
Fix
Replace the cross-module test-class share with a named consumable configuration:
The testJar deliberately excludes `src/test/resources` because that tree contains the ~3.6 GB `json/cityofchicago.json` benchmark dataset which would blow past the zip 4 GB limit and is not needed by downstream consumers (they need `Holder` / `JsonTestHelper` / `IteratorTester` classes, not the bench input).
Test plan