mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-31 21:28:52 +00:00
Apply Genymobile rules for Android projects
Apply Genymobile checkstyle and gradle build files organization.
This commit is contained in:
parent
285fc97d02
commit
e55e42a442
19 changed files with 299 additions and 52 deletions
28
config/android-checkstyle.gradle
Normal file
28
config/android-checkstyle.gradle
Normal file
|
@ -0,0 +1,28 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue