summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjandegr <jandegr@users.noreply.github.com>2018-05-15 09:52:24 +0200
committerGitHub <noreply@github.com>2018-05-15 09:52:24 +0200
commit0f41ad101ac21babc60536bdca124e26ee26c1ff (patch)
treea9ebd560ad3584427dab248e289a80ba03cad860
parent9e6277e776bb9a70159dbc07d62224c753848467 (diff)
downloadnavit-0f41ad101ac21babc60536bdca124e26ee26c1ff.tar.gz
add chackstyle and javadoc
-rw-r--r--navit/android/build.gradle38
1 files changed, 37 insertions, 1 deletions
diff --git a/navit/android/build.gradle b/navit/android/build.gradle
index 4ae19a148..e7f9442fc 100644
--- a/navit/android/build.gradle
+++ b/navit/android/build.gradle
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
+apply plugin: 'checkstyle'
android {
compileSdkVersion 27
@@ -43,8 +44,43 @@ android {
path '../../CMakeLists.txt'
}
}
-}
+ task checkstyleMain(type: Checkstyle){
+ source 'src'
+ include '**/*.java'
+ configFile = rootProject.file('navit/android/google_checks.xml')
+ ignoreFailures = true
+ showViolations = true
+ // empty classpath
+ classpath = files()
+ reports {
+ include ( '**/*.java')
+ xml.enabled = true
+ html.enabled = true
+ xml {
+ destination "checkstyle/checkstyleMain.xml"
+ }
+ html {
+ destination "checkstyle/checkstyleMain.html"
+ }
+ }
+
+ checkstyle {
+ toolVersion = '8.10'
+ }
+
+ applicationVariants.all { variant ->
+ // create tasks to generate Javadocs
+ task("generate${variant.name.capitalize()}Javadoc", type: Javadoc) {
+ source = variant.javaCompile.source
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+ destinationDir = file("build/outputs/docs/javadoc/")
+ title = rootProject.name
+ verbose = true
+ failOnError false
+ }
+ }
+}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {