autonomousapps / gradle-best-practices-plugin

Gradle Plugin that detects violations of Gradle best practices in Gradle Plugins
Apache License 2.0
181 stars 3 forks source link

Detect and flag unsorted dependency lists #2

Closed jamesonwilliams closed 1 year ago

jamesonwilliams commented 2 years ago

Let's say I have a dependencies block, like:

dependencies {
    implementation project(':foo')
    implementation project(':bar')
}

:foo is out of lexicographic order with respect to :bar in this block. For modules with huge dependency lists, this situation becomes a maintenance burden:

  1. It's hard to read the dependencies list, and
  2. Updates to the list may conceal the changed dependencies during code review.

I'm not sure if this gradle-best-practices-plugin project would be an appropriate home for this check - but I thought I'd ask!

See also: https://github.com/nebula-plugins/gradle-lint-plugin/issues/113

autonomousapps commented 1 year ago

I think this isn't a good use-case for this plugin. I do have an alternative project that is nearly ready to be published that will solve this, though.