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

Add sort rule for Kotlin Symbol Processor #101

Closed jamesonwilliams closed 1 month ago

jamesonwilliams commented 2 months ago

This project has no explicit handling for the ksp configuration, so if you try to sort something like:

dependencies {
  implementation projects.modules.quixotic
  runtimeOnly projects.modules.foo
  kapt projects.modules.baz
  ksp projects.modules.bar
  testImplementation projects.pastiche
}

You'll end up with a sub-optimal result where ksp is not near kapt (and `annotationProcessor, not pictured.)

dependencies {
  ksp projects.modules.bar

  implementation projects.modules.quixotic

  runtimeOnly projects.modules.foo

  kapt projects.modules.baz

  testImplementation projects.pastiche
}

Opinion: those three things should be near to one another