build.gradle 2.69 KB
Newer Older
1
2
buildscript {
    repositories {
3
        google()
tobiasKaminsky's avatar
tobiasKaminsky committed
4
        jcenter()
5
6
    }
    dependencies {
7
        classpath 'com.android.tools.build:gradle:3.3.2'
8
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
9
10
    }
}
11

12
apply plugin: 'com.android.library'
Andy Scherzinger's avatar
Andy Scherzinger committed
13
apply plugin: 'com.github.dcendents.android-maven'
14
apply plugin: 'findbugs'
Andy Scherzinger's avatar
Andy Scherzinger committed
15

16
repositories {
17
    google()
tobiasKaminsky's avatar
tobiasKaminsky committed
18
    jcenter()
19
20
21
}

dependencies {
22
    api 'com.squareup.moshi:moshi:1.8.0'
23
    api 'org.apache.jackrabbit:jackrabbit-webdav:2.12.6+'
24
25
    implementation 'org.parceler:parceler-api:1.1.12'
    annotationProcessor 'org.parceler:parceler:1.1.12'
26
    implementation "com.android.support:support-annotations:28.0.0"
vincent's avatar
vincent committed
27

28
29
    findbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.8.0'
    findbugsPlugins 'com.mebigfatguy.fb-contrib:fb-contrib:7.4.3'
30
31
32
}

android {
33
    compileSdkVersion 25
34
35
36
37
38
39
40
41
42
43
44
45
46

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        // Move the tests to tests/java, tests/res, etc...
tobiasKaminsky's avatar
tobiasKaminsky committed
47
        // instrumentTest.setRoot('tests')
48
49
50
51
52
53
54
55
56
57
58

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }

59
60
    lintOptions {
        abortOnError false
61
62
        htmlReport true
        htmlOutput file("$project.buildDir/reports/lint/lint.html")
63
    }
tobiasKaminsky's avatar
tobiasKaminsky committed
64

tobiasKaminsky's avatar
tobiasKaminsky committed
65
66
    defaultConfig {
        minSdkVersion 14
67
        targetSdkVersion 25
tobiasKaminsky's avatar
tobiasKaminsky committed
68
    }
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89

    task findbugs(type: FindBugs) {
        ignoreFailures = false
        effort = "max"
        reportLevel = "medium"
        classes = fileTree("$project.buildDir/intermediates/javac/debug/compileDebugJavaWithJavac/classes/")
        excludeFilter = file("${project.rootDir}/scripts/analysis/findbugs-filter.xml")
        source = fileTree('src/main/java')
        pluginClasspath = project.configurations.findbugsPlugins
        classpath = files()
        include '**/*.java'
        exclude '**/gen/**'

        reports {
            xml.enabled = false
            html.enabled = true
            html {
                destination = file("$project.buildDir/reports/findbugs/findbugs.html")
            }
        }
    }
90
}