mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-05 06:00:21 +00:00
e55e42a442
Apply Genymobile checkstyle and gradle build files organization.
29 lines
642 B
Groovy
29 lines
642 B
Groovy
apply plugin: 'checkstyle'
|
|
check.dependsOn 'checkstyle'
|
|
|
|
checkstyle {
|
|
toolVersion = '6.19'
|
|
}
|
|
|
|
task checkstyle(type: Checkstyle) {
|
|
description = "Check Java style with Checkstyle"
|
|
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
|
|
source = javaSources()
|
|
classpath = files()
|
|
ignoreFailures = true
|
|
}
|
|
|
|
def javaSources() {
|
|
def files = []
|
|
android.sourceSets.each { sourceSet ->
|
|
sourceSet.java.each { javaSource ->
|
|
javaSource.getSrcDirs().each {
|
|
if (it.exists()) {
|
|
files.add(it)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return files
|
|
}
|