Skip to content

Conversation

@Technici4n
Copy link
Member

Quickly thrown together, needs cleaning up and testing. The goal here is to move to lazy configuration of Configurations, which will be applicable starting from Gradle 8.14.

I wonder if there would be a way to detect all cases of eager Configuration configuration, to make sure that this PR is doing what it advertises.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

var java = (AdhocComponentWithVariants) project.getComponents().getByName("java");
java.addVariantsFromConfiguration(elementsConfiguration, variant -> {
// TODO: no better way?
java.addVariantsFromConfiguration(elementsConfiguration.get(), variant -> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use project.getComponents().named(...) to make this lazy

@neoforged-automation
Copy link

@Technici4n, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation neoforged-automation bot added the needs rebase This Pull Request needs to be rebased before being merged label May 3, 2025
@neoforged-automation neoforged-automation bot removed the needs rebase This Pull Request needs to be rebased before being merged label May 12, 2025
@neoforged-automation
Copy link

@Technici4n, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation neoforged-automation bot added the needs rebase This Pull Request needs to be rebased before being merged label Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase This Pull Request needs to be rebased before being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants