-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpixnews.gradle.kts
27 lines (24 loc) · 961 Bytes
/
pixnews.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Copyright (c) 2023, the Pixnews project authors and contributors. Please see the AUTHORS file for details.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
*/
plugins {
id("ru.pixnews.gradle.project.lint.detekt")
id("ru.pixnews.gradle.project.lint.diktat")
id("ru.pixnews.gradle.project.lint.spotless")
}
interface InjectedFileSystemOperations {
@get:Inject val fs: FileSystemOperations
}
tasks.named("clean").configure {
val fsOps: InjectedFileSystemOperations = project.objects.newInstance()
val includedBuildsBuildDirs = gradle.includedBuilds.map { File(it.projectDir, "/build") }
doLast {
fsOps.fs.delete { delete(includedBuildsBuildDirs) }
}
}
tasks.register("styleCheck") {
group = "Verification"
description = "Runs code style checking tools (excluding tests and Android Lint)"
dependsOn("detektCheck", "spotlessCheck", "diktatCheck")
}