blob: c8683d4ce34509686f004aeeaa4cdf16d71b977a [file] [log] [blame]
Yigit Boyar88c16ce2017-02-08 16:06:14 -08001/*
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 Liutikas526389b2018-02-27 14:01:24 -080016
17import androidx.build.DacOptions
Alan Viverettecc5197e2016-06-13 12:45:07 -040018
Jeff Gastond79ef852018-01-09 17:53:15 -050019def currentJvmVersion = org.gradle.api.JavaVersion.current()
20if (currentJvmVersion.getMajorVersion() != "8") {
21throw new Exception("Unsupported java version '" + currentJvmVersion.toString() + "'. Please install java 8.\n" +
22"\n" +
23"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.")
24}
25
26
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080027buildscript {
Yigit Boyar88c16ce2017-02-08 16:06:14 -080028ext.supportRootFolder = project.projectDir
Aurimas Liutikas9ab3b4c32017-04-19 09:33:27 -070029apply from: 'buildSrc/repos.gradle'
Yigit Boyar88c16ce2017-02-08 16:06:14 -080030apply from: 'buildSrc/init.gradle'
Sergey Vasilinets6aa53ca2017-11-03 12:20:28 -070031apply from: 'buildSrc/build_dependencies.gradle'
Yigit Boyar95c6a872017-03-03 10:54:49 -080032init.setSdkInLocalPropertiesFile()
Aurimas Liutikas9ab3b4c32017-04-19 09:33:27 -070033repos.addMavenRepositories(repositories)
Aurimas Liutikas75b3d2e2017-03-15 10:34:55 -070034
35dependencies {
Sergey Vasilinets6aa53ca2017-11-03 12:20:28 -070036classpath build_libs.gradle
37classpath build_libs.jacoco
Filip Pavlisf61a6d82017-11-29 15:40:18 +000038classpath build_libs.jetifier
Chris Craik15486292018-01-17 15:34:59 -080039classpath build_libs.kotlin.gradle_plugin
Aurimas Liutikas75b3d2e2017-03-15 10:34:55 -070040}
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080041}
Aurimas Liutikasf09d8582017-01-20 21:49:51 -080042
Aurimas Liutikas9ab3b4c32017-04-19 09:33:27 -070043repos.addMavenRepositories(repositories)
Alan Viverettecc5197e2016-06-13 12:45:07 -040044
Yigit Boyar88c16ce2017-02-08 16:06:14 -080045init.setupRepoOutAndBuildNumber()
Alan Viverettecc5197e2016-06-13 12:45:07 -040046
Yigit Boyar88c16ce2017-02-08 16:06:14 -080047init.configureSubProjects()
Alan Viverettecc5197e2016-06-13 12:45:07 -040048
Aurimas Liutikas38e8f4d92017-06-16 08:31:03 -070049init.configureBuildOnServer()
50
Yigit Boyar88c16ce2017-02-08 16:06:14 -080051init.setupRelease()
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080052
Jeff Gaston5d480f82018-01-29 11:41:32 -050053apply from: 'buildSrc/jetify.gradle'
54
Sergey Vasilinets16385352017-12-13 16:56:47 -080055init.enableDoclavaAndJDiff(this, new DacOptions("android/support", "SUPPORT_DATA"))
Yigit Boyar95c6a872017-03-03 10:54:49 -080056
57///// FLATFOOT START
58
Jeff Gastond79ef852018-01-09 17:53:15 -050059///// FLATFOOT END