square / gradle-dependencies-sorter

A CLI app and Gradle plugin to sort the dependencies in your Gradle build scripts
Apache License 2.0
252 stars 12 forks source link

Support string literal dependency notation for add calls #85

Open madisp opened 9 months ago

madisp commented 9 months ago

This currently fails with parsing:

dependencies {
  add("myconfig", "com.example:foo:1.2.3")
}

parse error:

1: extraneous input '"' expecting {'file(', 'files(', 'project', ID}, 2: extraneous input '"' expecting {'}', ID}
autonomousapps commented 9 months ago

Thanks for the issue.

madisp commented 9 months ago

NOTE: as a workaround, version catalog references are ok, e.g. this will work:

dependencies {
  add("myconfig", libs.foo)
}