Skip to content

Fix DRA dependenciesInfo task dependency resolution #129209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@
import org.gradle.api.Project;
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.attributes.Category;
import org.gradle.api.attributes.Usage;
import org.gradle.api.plugins.JavaPlugin;

public class DependenciesInfoPlugin implements Plugin<Project> {

public static String USAGE_ATTRIBUTE = "DependenciesInfo";

@Override
public void apply(final Project project) {
project.getPlugins().apply(CompileOnlyResolvePlugin.class);
Expand All @@ -43,6 +47,9 @@ public void apply(final Project project) {
)
);

dependenciesInfoFilesConfiguration.attributes(
attributes -> attributes.attribute(Usage.USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, USAGE_ATTRIBUTE))
);
project.getArtifacts().add("dependenciesInfoFiles", depsInfo);

}
Expand Down
3 changes: 3 additions & 0 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ configurations {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, project.getObjects().named(Category.class, Category.DOCUMENTATION))
}
attributes {
attribute(Usage.USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, DependenciesInfoPlugin.USAGE_ATTRIBUTE))
}
}
featuresMetadata {
attributes {
Expand Down