Skip to content

Lack of blank line between dependency blocks ignored if dependencies already sorted #164

Description

@veyndan

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions