dropbox / dependency-guard

A Gradle plugin that guards against unintentional dependency changes.
Apache License 2.0
406 stars 15 forks source link

Fix "baseline created" message in DependencyGuardTreeDiffer #46

Closed qwert2603 closed 1 year ago

qwert2603 commented 1 year ago

Hello!

When DependencyGuardTreeDiffer writes a tree baseline file, it prints the following message (sources):

"Dependency Guard Tree baseline created for : for configuration classpath."

But DependencyGuardTreeDiffer writes a tree baseline file for the given project.path and configurationName, not only for : and classpath. So it would be useful to print the correct project.path and configurationName in the output message.

Expected example of the output message:

"Dependency Guard Tree baseline created for :lib for configuration testCompileClasspath."
handstandsam commented 1 year ago

Ahh, thanks. I'll take a look at this. The link you sent to the source code is helpful. At first glance it seems like it shouldn't be hard coded like that. I'll check.

We're heavily using the list format of dependencies and not the tree currently, so didn't see this.

Will report back. Thanks!


Also, are you using this on anything open source? I'd love to point to a few projects that are using dependency-guard.

handstandsam commented 1 year ago

Ahh, so there are 2 usages of this method.

  1. Using the build environment tree
  2. Using the project environment tree

I must have just been testing the message for the build environment. Good catch!

handstandsam commented 1 year ago

0.3.2 is publishing and contains this fix.

qwert2603 commented 1 year ago

Thanks for the fix!

Also, are you using this on anything open source?

Currently not. But I may try it on some of my pet projects later.

handstandsam commented 1 year ago

Thank you. Are you using the library for something private or at work? Just curious what kind of configuration you have. Cheers

qwert2603 commented 1 year ago

I'm planning to use the library for a pet project and work android-project. I also think that list configuration is more useful than tree. And it's helpful to guard releaseRuntimeClasspath, debugUnitTestRuntimeClasspath and debugAndroidTestRuntimeClasspath for the app module and classpath confuguration for the root gradle project to get the full picture of project dependencies.