Assuming we have sortDependencies.insertBlankLines = true set, running ./gradlew checkSortDependencies on a Gradle build file like the following won't fail, nor will it change if ./gradlew sortDependencies is ran:
dependencies {
api(libs.foo)
implementation(libs.bar)
}
This is because the dependency order is correct. The fact that there is no blank line between the dependency blocks is ignored.
If we instead had the following Gradle build file:
dependencies {
implementation(libs.bar)
api(libs.foo)
}
Then running ./gradlew sortDependencies would produce the following as expected, with the blank line and all:
dependencies {
api(libs.foo)
implementation(libs.bar)
}
Assuming we have
sortDependencies.insertBlankLines = trueset, running./gradlew checkSortDependencieson a Gradle build file like the following won't fail, nor will it change if./gradlew sortDependenciesis ran:This is because the dependency order is correct. The fact that there is no blank line between the dependency blocks is ignored.
If we instead had the following Gradle build file:
Then running
./gradlew sortDependencieswould produce the following as expected, with the blank line and all: