Add global formatter to gradle build files.

main
Alex Hart 2023-03-06 10:46:51 -04:00 zatwierdzone przez GitHub
rodzic c30e3664b8
commit 33ab25a557
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -84,3 +84,18 @@ task qa {
task clean(type: Delete) {
delete rootProject.buildDir
}
task format {
group 'Formatting'
description 'Runs the ktlint formatter on all sources in this project and included builds'
def dependencyList = subprojects.collect {
tasks.findByPath(":${it.name}:ktlintFormat")
}
dependencyList.removeIf { it == null}
dependencyList.add(0, gradle.includedBuild('build-logic').task(':plugins:ktlintFormat'))
dependencyList.add(0, gradle.includedBuild('build-logic').task(':tools:ktlintFormat'))
dependsOn dependencyList
}