Repository navigation
Parse Java distribution from .sdkmanrc #971
Description
Activity
- addedfeature requestNew feature or request to improve the current logicNew feature or request to improve the current logic
on Jan 15, 2026 Hello @mlschechter, Thank you for creating this issue and we will get back to you once we have some feedback on this :)
Reacted by nyoI've implemented this feature in PR #975.
Why This Feature Matters
When using
.sdkmanrc, the distribution information is already present in the file format itself (e.g.,java=21.0.5-temwheretemindicates Temurin). Currently, users must redundantly specify this in their workflow:Current requirement (redundant):
- uses: actions/setup-java@main with: distribution: temurin # Duplicates information from .sdkmanrc java-version-file: .sdkmanrc
.sdkmanrc already contains:
java=21.0.5-tem # "tem" already indicates TemurinValue Proposition
- Eliminates Redundancy: The distribution parameter becomes unnecessary when
.sdkmanrcalready specifies it - Single Source of Truth: Java configuration lives entirely in
.sdkmanrc - Consistency: Local development (SDKMAN) and CI/CD use identical configuration
- Simplified Workflows: One less parameter to maintain and keep in sync
With this feature:
- uses: actions/setup-java@main with: java-version-file: .sdkmanrc # That's it!
The implementation is backward compatible - if
.sdkmanrcdoesn't include a distribution suffix, thedistributionparameter is still required.Reacted by 이정렬(AWS), nyo and Oliver BehnckeReacted by nyo- Eliminates Redundancy: The distribution parameter becomes unnecessary when
Implemented in PR #975. The PR now parses supported SDKMAN distribution suffixes from
.sdkmanrc, including the mapping fixes and test coverage discussed in review.Reacted by Michael SchechterReacted by Michael Schechtermichael-schechter-simspace commented
on Jun 10, 2026 More actions@lukaszgyg - Thanks for the implementation; is there any information on when this will be merged and released?
Unfortunately no :-(
@aparnajyothi-y how we can trigger the review process for #975- addeddistributionJDK distribution/version/source supportJDK distribution/version/source support
on Jun 22, 2026 Tracked under the epic #1048 (infer Java version/distribution from project files), which groups the related file-based detection requests for consistent design. This issue stays open as the specific sub-request.
Description:
Given that the action now supports reading the Java version from the
.sdkmanrcfile, it would be advantageous to read a default distribution from that file as well. SDKMan uses distinct suffixes for each distribution to simplify mapping.Justification:
Removes the need for users to duplicate the distribution information into their workflow.
Are you willing to submit a PR?
Maybe? Depends on the level of effort :)