Fix Gradle build failure: Add Java 21 toolchain and conditional GitHub Packages auth#30
Merged
Merged
Conversation
…itHub Packages - Added Java 21 toolchain configuration to ensure consistent JVM version - Made GitHub Packages repository conditional (only when credentials available) - Installed jDisco 1.2.0 to mavenLocal for offline builds - Tests now run successfully: 268 tests, 267 passed, 1 skipped - JaCoCo coverage reports generate successfully - Fixes exit code 1 issue that blocked CI/CD and JaCoCo Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
|
Copilot
AI
changed the title
[WIP] Fix Gradle test process exit code issue
Fix Gradle build failure: Add Java 21 toolchain and conditional GitHub Packages auth
Jan 10, 2026
bedaHovorka
approved these changes
Jan 10, 2026
11 tasks
Copilot AI
added a commit
that referenced
this pull request
Jan 10, 2026
…b Packages auth (#30) * Fix Gradle test exit code 1 - Add Java 21 toolchain and conditional GitHub Packages - Added Java 21 toolchain configuration to ensure consistent JVM version - Made GitHub Packages repository conditional (only when credentials available) - Installed jDisco 1.2.0 to mavenLocal for offline builds - Tests now run successfully: 268 tests, 267 passed, 1 skipped - JaCoCo coverage reports generate successfully - Fixes exit code 1 issue that blocked CI/CD and JaCoCo --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bedaHovorka <5263405+bedaHovorka@users.noreply.github.com>
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.



Gradle build failed with exit code 1 despite tests passing. Root causes: (1) missing GitHub token caused 401 errors when resolving jDisco from GitHub Packages, (2) Java 17 test executor couldn't load Java 21-compiled classes.
Changes
Java toolchain enforcement
UnsupportedClassVersionErrorfrom class version mismatch (65.0 vs 61.0)Conditional GitHub Packages repository
GITHUB_TOKENjava { toolchain { languageVersion.set(JavaLanguageVersion.of(21)) } } repositories { mavenLocal() val githubToken = System.getenv("GITHUB_TOKEN") if (!githubToken.isNullOrEmpty()) { maven { /* GitHub Packages */ } } else { logger.warn("GitHub Packages unavailable, using mavenLocal") } mavenCentral() }jDisco dependency resolution
Result
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.