build.gradle 1.1 KB
Newer Older
1 2
buildscript {
    repositories {
S
Sam Judd 已提交
3 4 5
        jcenter()
        // TODO: remove this when robolectric 2.4 is released.
        maven {
6
            url 'https://oss.sonatype.org/content/repositories/snapshots'
S
Sam Judd 已提交
7
        }
8
    }
S
Sam Judd 已提交
9

10
    dependencies {
S
Sam Judd 已提交
11 12 13 14 15
        classpath 'org.robolectric:robolectric-gradle-plugin:0.11.+'
        classpath 'com.android.tools.build:gradle:0.12.+'
    }
}

16
subprojects { project ->
S
Sam Judd 已提交
17 18 19 20
    repositories {
        jcenter()
        // TODO: remove this when robolectric 2.4 is released.
        maven {
21
            url 'https://oss.sonatype.org/content/repositories/snapshots'
S
Sam Judd 已提交
22
        }
23
    }
24

25 26 27 28 29 30 31 32 33 34 35 36 37 38
    apply plugin: 'checkstyle'

    checkstyle {
        configFile = new File(rootDir, 'checkstyle.xml')
    }

    task checkstyle(type: Checkstyle) {
        source 'src'
        include '**/*.java'
        exclude '**/gen/**'

        // empty classpath
        classpath = files()
    }
39 40 41 42 43 44

    afterEvaluate {
        if (project.tasks.findByName('check')) {
            check.dependsOn('checkstyle')
        }
    }
45
}
S
Sam Judd 已提交
46 47

task wrapper(type: Wrapper) {
S
Sam Judd 已提交
48
    gradleVersion = '1.12'
S
Sam Judd 已提交
49
}