]> git.somenet.org - android/helloworld.git/blob - app/build.gradle
Added lint, checkstyle and findbugs reporting.
[android/helloworld.git] / app / build.gradle
1 apply plugin: 'com.android.application'
2 apply plugin: 'checkstyle'
3 apply plugin: 'findbugs'
4
5 check.dependsOn 'checkstyle', 'findbugs'
6
7 android {
8     compileSdkVersion 22
9     buildToolsVersion "22.0.1"
10
11     defaultConfig {
12         applicationId "org.somenet.android.helloworld2"
13         minSdkVersion 19
14         targetSdkVersion 22
15         versionCode 12
16         versionName "2.1.3a"
17     }
18     buildTypes {
19         release {
20             minifyEnabled false
21             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22         }
23     }
24
25     if (new File("${System.properties['user.home']}/.android/release.gradle").exists()) {
26         apply from: "${System.properties['user.home']}/.android/release.gradle";
27     } else {
28         logger.warn('SigningConfig not found!')
29     }
30
31     lintOptions {
32         abortOnError false
33     }
34 }
35
36 dependencies {
37     compile fileTree(dir: 'libs', include: ['*.jar'])
38     compile 'com.android.support:appcompat-v7:22.+'
39 }
40
41
42 task checkstyle(type: Checkstyle) {
43     source 'src'
44     include '**/*.java'
45     exclude '**/gen/**'
46     classpath = files()
47
48     configFile file("${project.rootDir}/config/checkstyle/checkstyle.xml")
49 }
50
51 task findbugs(type: FindBugs) {
52     source 'src'
53     include '**/*.java'
54     exclude '**/gen/**'
55     classpath = files()
56
57     excludeFilter file("${project.rootDir}/config/findbugs/findbugs-filter.xml")
58     classes = files("${project.rootDir}/app/build/intermediates/classes/")
59
60     ignoreFailures = true
61
62     reports {
63         xml.enabled = true
64         html.enabled = false
65     }
66 }