Skip to content

Conversation

alllex
Copy link
Member

@alllex alllex commented Mar 10, 2025

Annotates remaining Project-scope services and makes the Project-scope service registry strictly requiring the annotations.

Follows up after #32636

@alllex

This comment has been minimized.

@alllex alllex self-assigned this Mar 10, 2025
@bot-gradle

This comment has been minimized.

@alllex alllex added the in:internal-services Internal services dependency injection label Mar 10, 2025
@alllex alllex changed the base branch from master to release March 10, 2025 14:20
@bot-gradle
Copy link
Collaborator

The following builds have failed:

@alllex
Copy link
Member Author

alllex commented Mar 10, 2025

@bot-gradle test without pts

@bot-gradle

This comment has been minimized.

@bot-gradle
Copy link
Collaborator

The following builds have passed:

@alllex alllex marked this pull request as ready for review March 10, 2025 17:33
@alllex alllex requested a review from a team as a code owner March 10, 2025 17:33
@alllex alllex requested a review from a team March 10, 2025 17:33
@alllex alllex requested review from a team as code owners March 10, 2025 17:33
@alllex alllex requested a review from a team March 10, 2025 17:33
@alllex alllex requested a review from a team March 10, 2025 17:33
@alllex alllex requested review from a team as code owners March 10, 2025 17:33
@alllex alllex requested review from a team, abstratt, bamboo, octylFractal and reinsch82 and removed request for a team March 10, 2025 17:33
import java.io.File;

@ServiceScope(Scope.Project.class)
public class DefaultProjectLayout implements ProjectLayout, TaskFileVarFactory {
Copy link
Member

Choose a reason for hiding this comment

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

Could this be dropped if we registered ProjectLayout as the service?

Copy link
Member Author

Choose a reason for hiding this comment

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

We already register it as a service. The current reason is due to DefaultProject injecting the implementation, rather than the interfaces:

public abstract DefaultProjectLayout getLayout();

It seems, this is only due to the need to do DefaultProjectLayout#setBuildDirectory, which according to the comment should go away:

/**
* A temporary home. Should be on the public API somewhere
*/
public void setBuildDirectory(Object value) {
buildDir.set(fileResolver.resolve(value));
}

It's a nice catch, I'll fix it in a follow-up to avoid mixing non-trivial changes to this PR.

Copy link
Member Author

@alllex alllex Mar 11, 2025

Choose a reason for hiding this comment

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

Here is the follow-up. It resolved your question, but also uncovered more questions about the buildDirectory setter

@alllex alllex added this pull request to the merge queue Mar 10, 2025
@bot-gradle bot-gradle added this to the 8.14 RC1 milestone Mar 10, 2025
Merged via the queue into release with commit d78fa68 Mar 11, 2025
29 checks passed
@alllex alllex deleted the alllex/gist/remaining-project-services branch March 11, 2025 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:internal-services Internal services dependency injection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants