dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

Support type-safe project dependencies in config

Open eugene-krivobokov opened this issue 4 years ago • 3 comments
trafficstars

Is your feature request related to a problem? Please describe.

Can't use type-safe project accessors in config:

exclude("my-project:subproject")

We migrated to type-safe project accessors but have to use string paths in configs. It'd great to use the same notation.

Describe the solution you'd like

To pass type-safe project accessors to the config:

exclude(projects.myProject.subproject)

Describe alternatives you've considered

exclude(projects.myProject.subproject.dependencyProject.path)

Additional context

eugene-krivobokov avatar Sep 19 '21 16:09 eugene-krivobokov

This seems like it might be a reasonable request, but I'm also hesitant to move forward given that the feature requires explicitly opting in by Gradle. Can you convert the type-safe acessor to a string? I.e., something like

projects.myProject.subproject.toString()

?

autonomousapps avatar Sep 19 '21 17:09 autonomousapps

I understand concerns about the experimental state of this feature.

I've found this way as a workaround:

projects.myProject.subproject.dependencyProject.path

Added it to the description.

eugene-krivobokov avatar Sep 19 '21 19:09 eugene-krivobokov

This is no longer blocked by gradle, since the feature is stable with 7.4, but I also cannot commit to working on it in the near-term, with higher priority bugs and features to resolve.

autonomousapps avatar Mar 26 '22 19:03 autonomousapps