blob: 68c77b7cc6c8bba5bd61731b126f23c2cdc63f4e [file] [log] [blame]
Sergey Vasilinets70a2e822017-11-03 12:20:28 -07001buildscript {
2 def supportRootFolder = project.projectDir.getParentFile()
Aurimas Liutikas7fa54122018-01-18 14:13:27 -08003 apply from: "unbundled_check.gradle"
Sergey Vasilinets70a2e822017-11-03 12:20:28 -07004 repositories {
5 maven {
6 url "${supportRootFolder}/../../prebuilts/tools/common/m2/repository"
7 }
Aurimas Liutikas7fa54122018-01-18 14:13:27 -08008 if (isUnbundledBuild(supportRootFolder)) {
9 jcenter()
10 }
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070011 }
Sergey Vasilinetsccb3fcb2017-10-16 23:46:48 +000012
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070013 apply from: "build_dependencies.gradle"
14
15 dependencies {
16 classpath build_libs.kotlin.gradle_plugin
17 }
Jake Wharton7495cc12018-01-05 11:05:13 -050018
19 configurations.classpath.resolutionStrategy {
20 eachDependency { details ->
21 if (details.requested.group == 'org.jetbrains.kotlin') {
22 details.useVersion build_versions.kotlin
23 }
24 }
25 }
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070026}
Sergey Vasilinets71469cb2017-11-17 13:56:50 -080027def runningInBuildServer = System.env.DIST_DIR != null && System.env.OUT_DIR != null
28if (runningInBuildServer) {
29 System.setProperty("kotlin.compiler.execution.strategy", "in-process")
30}
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070031
32apply from: "build_dependencies.gradle"
Aurimas Liutikasf09d8582017-01-20 21:49:51 -080033
Aurimas Liutikas9ab3b4c2017-04-19 09:33:27 -070034ext.supportRootFolder = project.projectDir.getParentFile()
35apply from: 'repos.gradle'
Aurimas Liutikas9ab3b4c2017-04-19 09:33:27 -070036
Sergey Vasilinetsccb3fcb2017-10-16 23:46:48 +000037repos.addMavenRepositories(repositories)
Sergey Vasilinetsbb245e02017-10-11 00:16:04 -070038
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070039apply plugin: 'java'
40apply plugin: 'kotlin'
41
Aurimas Liutikas1ac04ed2018-01-08 09:48:19 -080042apply from: "kotlin-dsl-dependency.gradle.kts"
43
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070044compileGroovy {
45 dependsOn tasks.getByPath('compileKotlin')
46 classpath += files(compileKotlin.destinationDir)
47}
Aurimas Liutikas9697da72016-12-22 15:50:42 -080048dependencies {
Sergey Vasilinets70a2e822017-11-03 12:20:28 -070049 compile build_libs.gradle
50 compile build_libs.jacoco
51 compile build_libs.error_prone
52 compile build_libs.jarjar_gradle
Aurimas Liutikasa1928282017-07-17 12:32:26 -070053 compile gradleApi()
Aurimas Liutikasec5894e2018-01-02 15:08:37 -080054 testCompile "junit:junit:4.12"
Aurimas Liutikas9697da72016-12-22 15:50:42 -080055}