mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-07-07 14:35:29 +01:00
Add global formatter to gradle build files.
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user