summaryrefslogtreecommitdiffstats
path: root/buildSrc/build.gradle
blob: 88a8aa8a2217d101b72d6a8135b7e5f4865e6415 (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
buildscript {
    def supportRootFolder = project.projectDir.getParentFile()
    apply from: "unbundled_check.gradle"
    repositories {
        maven {
            url "${supportRootFolder}/../../prebuilts/tools/common/m2/repository"
        }
        maven {
            url "${supportRootFolder}/../../prebuilts/gradle-plugin"
        }
        if (isUnbundledBuild(supportRootFolder)) {
            jcenter()
        }
    }

    apply from: "build_dependencies.gradle"

    dependencies {
        classpath build_libs.kotlin.gradle_plugin
    }

    configurations.classpath.resolutionStrategy {
        eachDependency { details ->
            if (details.requested.group == 'org.jetbrains.kotlin') {
                details.useVersion build_versions.kotlin
            }
        }
    }
}
def runningInBuildServer = System.env.DIST_DIR != null && System.env.OUT_DIR != null
if (runningInBuildServer) {
    System.setProperty("kotlin.compiler.execution.strategy", "in-process")
}

ext.supportRootFolder = project.projectDir.getParentFile()
apply from: 'repos.gradle'
apply from: "build_dependencies.gradle"
apply plugin: "kotlin"
apply from: "kotlin-dsl-dependency.gradle.kts"

repos.addMavenRepositories(repositories)

dependencies {
    compile build_libs.gradle
    compile build_libs.jacoco
    compile build_libs.error_prone_gradle
    compile build_libs.jarjar_gradle
    compile gradleApi()
    testCompile "junit:junit:4.12"
}