aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
blob: 5283f0e9f305b72879ca252b0deec159c2249f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.3'
        classpath 'me.tatarka:gradle-retrolambda:3.5.0'

        // NOTE: Do not place your application dependencies here.
    }
}

plugins {
    id "com.github.sherter.google-java-format" version "0.6"
}

repositories {
    jcenter()
}

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

allprojects {
    gradle.projectsEvaluated {
        tasks.withType(JavaCompile) {
            options.compilerArgs << "-Xlint:all"
        }
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion '25.0.0'

    defaultConfig {
        applicationId "com.google.android.mobly.snippet.bundled"
        minSdkVersion 11
        // Set target to 22 to avoid having to deal with runtime permissions.
        targetSdkVersion 22
        versionCode 1
        versionName "0.0.1"
        setProperty("archivesBaseName", "mobly-bundled-snippets")
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
        abortOnError true
        checkAllWarnings true
        warningsAsErrors true
    }
}

// Produces a jar of source files. Needed for compliance reasons.
task sourcesJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier = 'src'
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(
        android.getBootClasspath().join(File.pathSeparator))
}

artifacts {
    archives sourcesJar
}

dependencies {
    compile 'com.android.support.test:runner:0.5'
    compile 'com.google.android.mobly:mobly-snippet-lib:1.2.0'
    compile 'com.google.code.gson:gson:2.6.2'
    compile 'com.google.guava:guava:20.0'

    testCompile 'com.google.truth:truth:0.32'
    testCompile 'junit:junit:4.12'
}

googleJavaFormat {
    options style: 'AOSP'
}