Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Sergey Vasilinets | 1638535 | 2017-12-13 16:56:47 -0800 | [diff] [blame] | 16 | import android.support.DacOptions |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 17 | |
Jeff Gaston | d79ef85 | 2018-01-09 17:53:15 -0500 | [diff] [blame] | 18 | def currentJvmVersion = org.gradle.api.JavaVersion.current() |
| 19 | if (currentJvmVersion.getMajorVersion() != "8") { |
| 20 | throw new Exception("Unsupported java version '" + currentJvmVersion.toString() + "'. Please install java 8.\n" + |
| 21 | "\n" + |
| 22 | "If you have already installed java 8, you can instruct Gradle to use it by setting the environment variable JAVA_HOME equal to its file path.") |
| 23 | } |
| 24 | |
| 25 | |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 26 | buildscript { |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 27 | ext.supportRootFolder = project.projectDir |
Aurimas Liutikas | 9ab3b4c | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 28 | apply from: 'buildSrc/repos.gradle' |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 29 | apply from: 'buildSrc/init.gradle' |
Sergey Vasilinets | 6aa53ca | 2017-11-03 12:20:28 -0700 | [diff] [blame] | 30 | apply from: 'buildSrc/build_dependencies.gradle' |
Yigit Boyar | 95c6a87 | 2017-03-03 10:54:49 -0800 | [diff] [blame] | 31 | init.setSdkInLocalPropertiesFile() |
Aurimas Liutikas | 9ab3b4c | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 32 | repos.addMavenRepositories(repositories) |
Aurimas Liutikas | 75b3d2e | 2017-03-15 10:34:55 -0700 | [diff] [blame] | 33 | |
| 34 | dependencies { |
Sergey Vasilinets | 6aa53ca | 2017-11-03 12:20:28 -0700 | [diff] [blame] | 35 | classpath build_libs.gradle |
| 36 | classpath build_libs.jacoco |
Filip Pavlis | f61a6d8 | 2017-11-29 15:40:18 +0000 | [diff] [blame] | 37 | classpath build_libs.jetifier |
Chris Craik | 1548629 | 2018-01-17 15:34:59 -0800 | [diff] [blame] | 38 | classpath build_libs.kotlin.gradle_plugin |
Aurimas Liutikas | 75b3d2e | 2017-03-15 10:34:55 -0700 | [diff] [blame] | 39 | } |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 40 | } |
Aurimas Liutikas | f09d858 | 2017-01-20 21:49:51 -0800 | [diff] [blame] | 41 | |
Aurimas Liutikas | 9ab3b4c | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 42 | repos.addMavenRepositories(repositories) |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 43 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 44 | init.setupRepoOutAndBuildNumber() |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 45 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 46 | init.configureSubProjects() |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 47 | |
Aurimas Liutikas | 38e8f4d | 2017-06-16 08:31:03 -0700 | [diff] [blame] | 48 | init.configureBuildOnServer() |
| 49 | |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 50 | init.setupRelease() |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 51 | |
Jeff Gaston | 5d480f8 | 2018-01-29 11:41:32 -0500 | [diff] [blame] | 52 | apply from: 'buildSrc/jetify.gradle' |
| 53 | |
Sergey Vasilinets | 1638535 | 2017-12-13 16:56:47 -0800 | [diff] [blame] | 54 | init.enableDoclavaAndJDiff(this, new DacOptions("android/support", "SUPPORT_DATA")) |
Yigit Boyar | 95c6a87 | 2017-03-03 10:54:49 -0800 | [diff] [blame] | 55 | |
| 56 | ///// FLATFOOT START |
| 57 | |
Jeff Gaston | d79ef85 | 2018-01-09 17:53:15 -0500 | [diff] [blame] | 58 | ///// FLATFOOT END |