At CashApp we sometimes use the statement to explain why a dependency was added.
build.gradle
...
dependencies {
api com.example.dependency because "Provides x, y, and z"
}
This causes an error to log during dependency sorting task check ./gradlew checkSortDependencies but doesn't fail the build. Subsequently when trying to run ./gradlew sortDependencies it fails with the following error:
checkSortDependencies
> Task :sample:checkSortDependencies
[main] ERROR Sorter - Parsing error: ~/Development/cash-android/sample/build.gradle
1: extraneous input ',' expecting {'}', ID}
[main] INFO Sorter - See log file at /var/folders/h5/n0gh5sxn30l4zhc3467lmmvh0000gn/T/10077484166394996137.tmp
sortDependencies
> Task :sample:sortDependencies FAILED
[main] ERROR Sorter - Parsing error: ~/Development/cash-android/sample/build.gradle
1: extraneous input ',' expecting {'}', ID}
[main] INFO Sorter - See log file at /var/folders/h5/n0gh5sxn30l4zhc3467lmmvh0000gn/T/5662360564169139172.tmp
[Incubating] Problems report is available at: file://~/Development/cash-android/build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sample:sortDependencies'.
> Process 'command '~/Library/Java/JavaVirtualMachines/jdk-17.0.12_7-block-2024.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3
At CashApp we sometimes use the statement to explain why a dependency was added.
build.gradle
This causes an error to log during dependency sorting task check
./gradlew checkSortDependenciesbut doesn't fail the build. Subsequently when trying to run./gradlew sortDependenciesit fails with the following error: