Skip to content
Snippets Groups Projects
Verified Commit 8b59b003 authored by Sebastian's avatar Sebastian
Browse files

Properly configure checkstyle for Android modules

parent f6d5f23c
No related branches found
No related tags found
1 merge request!75Properly configure checkstyle for Android modules
Pipeline #10514 passed
plugins {
id 'com.android.library'
id 'checkstyle' // only needed for Java code
}
android {
......@@ -27,3 +28,5 @@ android {
dependencies {
implementation "androidx.annotation:annotation:1.3.0"
}
apply from: "${rootProject.rootDir}/gradle/checkstyle.gradle"
task checkstyleMain(type: Checkstyle) {
source 'src/main/java'
include '**/*.java'
classpath = files()
reports {
xml {
destination file("build/reports/checkstyle/main.xml")
}
html {
destination file("build/reports/checkstyle/main.html")
}
}
check.dependsOn it
}
task checkstyleTest(type: Checkstyle) {
source 'src/test/java'
include '**/*.java'
classpath = files()
reports {
xml {
destination file("build/reports/checkstyle/test.xml")
}
html {
destination file("build/reports/checkstyle/test.html")
}
}
check.dependsOn it
}
......@@ -152,3 +152,4 @@ tasks.withType(MergeResources) {
}
apply from: "${rootProject.rootDir}/gradle/ktlint.gradle"
apply from: "${rootProject.rootDir}/gradle/checkstyle.gradle"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment