autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.67k stars 115 forks source link

fix: Do not dotty for path matching and remove prefix and suffix from binary class name #1141

Closed Vampire closed 2 months ago

Vampire commented 4 months ago

For path matching the path was dottied too, which feels wrong, I guess this was just copy & paste and path matching cannot be configured right now anyway, so just fixed it while changing that code.

The main problem I'm trying to fix with this PR is, that I tried to do excludeAnnotations("""^\Qorg.spockframework.runtime.model.SpecMetadata\E$""") which did not match because the "L" prefix and the ";" suffix from the binary class name are still present. This PR removes the "L" prefix and the ";" suffix when dottying class names.

Vampire commented 4 months ago

Btw. is there a reason the filtering by path is commented out? Would be handy for me right now to exclude some classes by name pattern, but only within a specific source set.

autonomousapps commented 2 months ago

Btw. is there a reason the filtering by path is commented out? Would be handy for me right now to exclude some classes by name pattern, but only within a specific source set.

I don't recall. I think this was implemented by someone else and they didn't have the bandwidth to implement that component, so left it commented out as a reminder. If you want to contribute it, I'm happy to take a look.

autonomousapps commented 2 months ago

Thanks!