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 | */ |
Aurimas Liutikas | 526389b | 2018-02-27 14:01:24 -0800 | [diff] [blame] | 16 | |
Jake Wharton | 3c3f8f4 | 2018-07-17 22:40:28 -0400 | [diff] [blame] | 17 | import androidx.build.AndroidXPlugin |
Aurimas Liutikas | 55b44ec7 | 2018-07-27 16:29:35 -0700 | [diff] [blame] | 18 | import androidx.build.SdkHelperKt |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 19 | |
Jeff Gaston | d79ef85 | 2018-01-09 17:53:15 -0500 | [diff] [blame] | 20 | def currentJvmVersion = org.gradle.api.JavaVersion.current() |
| 21 | if (currentJvmVersion.getMajorVersion() != "8") { |
| 22 | throw new Exception("Unsupported java version '" + currentJvmVersion.toString() + "'. Please install java 8.\n" + |
| 23 | "\n" + |
| 24 | "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.") |
| 25 | } |
| 26 | |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 27 | buildscript { |
Yigit Boyar | 88c16ce | 2017-02-08 16:06:14 -0800 | [diff] [blame] | 28 | ext.supportRootFolder = project.projectDir |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 29 | apply from: 'buildSrc/repos.gradle' |
Sergey Vasilinets | 6aa53ca | 2017-11-03 12:20:28 -0700 | [diff] [blame] | 30 | apply from: 'buildSrc/build_dependencies.gradle' |
Aurimas Liutikas | 9ab3b4c3 | 2017-04-19 09:33:27 -0700 | [diff] [blame] | 31 | repos.addMavenRepositories(repositories) |
Aurimas Liutikas | 55b44ec7 | 2018-07-27 16:29:35 -0700 | [diff] [blame] | 32 | SdkHelperKt.setSdkInLocalPropertiesFile(ext.supportRootFolder) |
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 |
Chris Craik | 1548629 | 2018-01-17 15:34:59 -0800 | [diff] [blame] | 36 | classpath build_libs.kotlin.gradle_plugin |
Jeff Gaston | a7fd9a3 | 2018-09-26 17:04:43 -0400 | [diff] [blame] | 37 | classpath build_libs.dokka_gradle |
Aurimas Liutikas | 75b3d2e | 2017-03-15 10:34:55 -0700 | [diff] [blame] | 38 | } |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 39 | } |
Aurimas Liutikas | f09d858 | 2017-01-20 21:49:51 -0800 | [diff] [blame] | 40 | |
Aurimas Liutikas | 00c7dff | 2019-04-16 15:12:37 -0700 | [diff] [blame] | 41 | allprojects { |
| 42 | repos.addMavenRepositories(repositories) |
| 43 | } |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 44 | |
Aurimas Liutikas | 00c7dff | 2019-04-16 15:12:37 -0700 | [diff] [blame] | 45 | apply from: "buildSrc/dependencies.gradle" |
| 46 | apply from: "buildSrc/out.gradle" |
| 47 | init.chooseOutDir() |
Alan Viverette | cc5197e | 2016-06-13 12:45:07 -0400 | [diff] [blame] | 48 | |
Jake Wharton | 3c3f8f4 | 2018-07-17 22:40:28 -0400 | [diff] [blame] | 49 | apply plugin: AndroidXPlugin |
Xavier Ducrohet | 86fb8ef | 2013-02-22 15:04:37 -0800 | [diff] [blame] | 50 | |