Skip to content

Re-enable Support for relative java installation paths for Daemon toolchain#32894

Merged
ljacomet merged 1 commit into
gradle:masterfrom
vmadalin:daemon-toolchain-supports-relative-path-custom-locations
Mar 9, 2026
Merged

Re-enable Support for relative java installation paths for Daemon toolchain#32894
ljacomet merged 1 commit into
gradle:masterfrom
vmadalin:daemon-toolchain-supports-relative-path-custom-locations

Conversation

@vmadalin

@vmadalin vmadalin commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

Context

Original changes #32869 have been reverted due to an issue about running Gradle inside the lib folder of a generated (by Gradle init) library project, paths are evaluated relative to the execution location and not the folder containing settings. This has been fixed and a test was added to validate the mentioned scenario

Contributor Checklist

  • Review Contribution Guidelines.
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team.
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective.
  • Provide unit tests (under <subproject>/src/test) to verify logic.
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes.
  • Ensure that tests pass sanity check: ./gradlew sanityCheck.
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest.

@vmadalin vmadalin requested a review from a team as a code owner March 31, 2025 13:20
@vmadalin vmadalin requested review from a team and hegyibalint March 31, 2025 13:20
@bot-gradle bot-gradle added from:contributor PR by an external contributor to-triage labels Mar 31, 2025
@vmadalin vmadalin changed the title Add support for relative java installation paths for Daemon toolchain Re-enable Support for relative java installation paths for Daemon toolchain Mar 31, 2025
@vmadalin vmadalin marked this pull request as draft March 31, 2025 13:26
@vmadalin vmadalin force-pushed the daemon-toolchain-supports-relative-path-custom-locations branch from 8bb25ca to d117067 Compare March 31, 2025 13:34
@vmadalin vmadalin marked this pull request as ready for review March 31, 2025 13:44
@ov7a ov7a added in:daemon in:toolchains Java Toolchains and removed to-triage labels Apr 1, 2025
@vmadalin vmadalin force-pushed the daemon-toolchain-supports-relative-path-custom-locations branch from d117067 to f481333 Compare April 1, 2025 21:08
@vmadalin vmadalin requested a review from a team as a code owner April 1, 2025 21:08
@vmadalin vmadalin requested a review from a team April 1, 2025 21:08
@vmadalin

vmadalin commented Apr 2, 2025

Copy link
Copy Markdown
Contributor Author

Investigate how to make sure that the logic we use for determining the location of the gradle-daemon-jvm.properties is somehow accessible from here, or from a dedicated service.

Here are some changes based on the feedback provided:

  • The ScriptFileResolvedListener, ScriptFileResolverListeners and BuildLayoutFactory providers got moved from to GlobalScopeServices.java to BasicGlobalScopeServices.java
    • This isn't exactly a must since we had before several usages of new BuildLayoutFactory(), however, simplifies a bit to be able to use BuildLayoutFactory on the launcher from service
  • Storing BuildLayoutResult on Parameters this aligns with already existing class with same name on ProviderConnection.Parameters
    • This will make it easier potentially to merge those in the future but also keeps consistency between the both
  • Passing to DaemonClientFactory the BuildLayoutConfiguration from stored BuildLayoutResult on Parameters
    • Avoid passing directly the BuildLayoutResult since contains unnecessary methods like applyTo(). In addition is easy to convert one into another by using already existing BuildLayoutResult.toLayoutConfiguration() method
    • Since both Parameters classes CLI and TAPI now stores the BuildLayoutResult obtaining it isn't a problem to pass it down to DaemonClientToolchainServices

@vmadalin vmadalin requested a review from ljacomet April 2, 2025 09:39
@cobexer cobexer removed the request for review from a team April 3, 2025 08:20
@ljacomet ljacomet added this to the 9.0 RC1 milestone Apr 22, 2025
@mlopatkin mlopatkin removed the request for review from a team April 25, 2025 14:54
@ljacomet ljacomet modified the milestones: 9.0.0 RC1, 9.1.0 RC1 May 19, 2025
@jvandort jvandort modified the milestones: 9.1.0 RC1, 9.x Jun 12, 2025
@ljacomet ljacomet requested review from a team as code owners February 20, 2026 08:36
@ljacomet ljacomet requested review from 6hundreds, alllex and octylFractal and removed request for a team February 20, 2026 08:36
@ljacomet ljacomet changed the base branch from release to master February 20, 2026 08:36
@ljacomet ljacomet removed request for a team February 20, 2026 08:37
@ljacomet ljacomet modified the milestones: 9.x, 9.5.0 RC1 Feb 20, 2026
@ljacomet

Copy link
Copy Markdown
Member

@vmadalin Sorry for the long delay. I rebased this and will be validating it locally before doing one last review.

@ljacomet

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@alllex alllex removed their request for review February 20, 2026 11:11
@ljacomet

This comment has been minimized.

@bot-gradle

This comment has been minimized.

@bot-gradle

Copy link
Copy Markdown
Collaborator

The following builds have failed:

Signed-off-by: Madalin Valceleanu <vmadalin@google.com>
(cherry picked from commit cf5f11231c4ed229bf7859d04267697838861619)
@ljacomet

ljacomet commented Mar 6, 2026

Copy link
Copy Markdown
Member

@bot-gradle test RfN

@bot-gradle

This comment has been minimized.

@bot-gradle

Copy link
Copy Markdown
Collaborator

The following builds have passed:

@ljacomet ljacomet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did a final round of tests and working as expected.

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

Labels

from:contributor PR by an external contributor in:daemon in:toolchains Java Toolchains

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants