File: build.gradle

package info (click to toggle)
android-platform-development 10.0.0%2Br36-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 135,564 kB
  • sloc: java: 160,253; xml: 127,434; python: 40,579; cpp: 17,579; sh: 2,569; javascript: 1,612; ansic: 879; lisp: 261; ruby: 183; makefile: 172; sql: 140; perl: 88
file content (45 lines) | stat: -rw-r--r-- 1,557 bytes parent folder | download | duplicates (6)
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
apply plugin: 'java'

repositories {
    maven { url '../../../prebuilts/tools/common/m2/repository' }
    maven { url '../../../prebuilts/gradle-plugin'}
}

/*
 * With the build server you are given two env variables.
 * The OUT_DIR is a temporary directory you can use to put things during the build.
 * The DIST_DIR is where you want to save things from the build.
 *
 * The build server will copy the contents of DIST_DIR to somewhere and make it available.
 */
if (System.env.DIST_DIR != null && System.env.OUT_DIR != null) {
    buildDir = new File(System.env.OUT_DIR + '/gradle/checkcolor').getCanonicalFile()
    project.ext.distDir = new File(System.env.DIST_DIR).getCanonicalFile()

    // the build server does not pass the build number so we infer it from the last folder of the dist path.
    ext.buildNumber = project.ext.distDir.getName()
} else {
    buildDir = file("${project.rootDir}/../../../out/host/gradle/checkcolor")
    project.ext.distDir = file("${project.rootDir}/../../../out/dist")
}

sourceCompatibility = 1.8

dependencies {
    compile 'com.android.tools.lint:lint-api:24.3.1'
    compile 'com.android.tools.lint:lint-checks:24.3.1'
    testCompile 'junit:junit:4.11'
    testCompile 'com.android.tools.lint:lint:24.3.1'
    testCompile 'com.android.tools.lint:lint-tests:24.3.1'
    testCompile 'com.android.tools:testutils:24.3.1'
}

jar {
    destinationDir project.ext.distDir

    manifest {
        attributes("Lint-Registry": "com.google.checkcolor.lint.HardcodedColorIssueRegistry")
    }
}

defaultTasks 'assemble'