blob: a88d8339825fc6dd5636885fb480ee828a61e1bd [file] [log] [blame]
Yigit Boyar2eb51992016-12-13 15:00:07 -08001/*
2 * Copyright (C) 2016 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 */
16
17// If you change this file, you should also change the settings gradle inside
18// the sub project.
Yigit Boyar34e50312017-01-14 14:06:13 -080019
Yigit Boyar450ed382017-03-02 09:48:25 -080020def inAppToolkitProject = rootProject.name == "app-toolkit"
21def supportRoot
22if (inAppToolkitProject) {
23 supportRoot = new File(rootProject.projectDir, "..").getCanonicalFile()
24} else {
25 supportRoot = rootProject.projectDir
26}
Yigit Boyar34e50312017-01-14 14:06:13 -080027
Yigit Boyar450ed382017-03-02 09:48:25 -080028println "support root:${supportRoot}"
29
30include ':apptoolkit:core'
31project(':apptoolkit:core').projectDir = new File(supportRoot, "app-toolkit/core")
32
33include ':apptoolkit:core-testing'
34project(':apptoolkit:core-testing').projectDir = new File(supportRoot, "app-toolkit/core-testing")
Sergey Vasilinets459caad2017-03-01 11:11:34 -080035
Yigit Boyar2eb51992016-12-13 15:00:07 -080036include ':lifecycle:extensions'
Yigit Boyar450ed382017-03-02 09:48:25 -080037project(':lifecycle:extensions').projectDir = new File(supportRoot, "lifecycle/extensions")
Yigit Boyar2eb51992016-12-13 15:00:07 -080038
Jason Neufeld5349f0e2017-02-17 11:17:55 -080039include ':lifecycle:reactivestreams'
Yigit Boyar450ed382017-03-02 09:48:25 -080040project(':lifecycle:reactivestreams').projectDir = new File(supportRoot, "lifecycle/reactivestreams")
Jason Neufeld5349f0e2017-02-17 11:17:55 -080041
Yigit Boyar2eb51992016-12-13 15:00:07 -080042include ':lifecycle:runtime'
Yigit Boyar450ed382017-03-02 09:48:25 -080043project(':lifecycle:runtime').projectDir = new File(supportRoot, "lifecycle/runtime")
Yigit Boyar2eb51992016-12-13 15:00:07 -080044
45include ':lifecycle:common'
Yigit Boyar450ed382017-03-02 09:48:25 -080046project(':lifecycle:common').projectDir = new File(supportRoot, "lifecycle/common")
Yigit Boyar2eb51992016-12-13 15:00:07 -080047
48include ':lifecycle:compiler'
Yigit Boyar450ed382017-03-02 09:48:25 -080049project(':lifecycle:compiler').projectDir = new File(supportRoot, "lifecycle/compiler")
Yigit Boyar2eb51992016-12-13 15:00:07 -080050
Ian Lake4fa94442017-03-06 14:12:53 -080051include ':lifecycle:integration-tests:testapp'
52project(':lifecycle:integration-tests:testapp').projectDir = new File(supportRoot, "lifecycle/integration-tests/testapp")
Yigit Boyar2eb51992016-12-13 15:00:07 -080053
54include ':room:common'
Yigit Boyar450ed382017-03-02 09:48:25 -080055project(':room:common').projectDir = new File(supportRoot, "room/common")
Yigit Boyar2eb51992016-12-13 15:00:07 -080056
57include ':room:runtime'
Yigit Boyar450ed382017-03-02 09:48:25 -080058project(':room:runtime').projectDir = new File(supportRoot, "room/runtime")
Yigit Boyar2eb51992016-12-13 15:00:07 -080059
60include ':room:compiler'
Yigit Boyar450ed382017-03-02 09:48:25 -080061project(':room:compiler').projectDir = new File(supportRoot, "room/compiler")
Yigit Boyar2eb51992016-12-13 15:00:07 -080062
63include ':room:db'
Yigit Boyar450ed382017-03-02 09:48:25 -080064project(':room:db').projectDir = new File(supportRoot, "room/db")
Yigit Boyar2eb51992016-12-13 15:00:07 -080065
66include ":room:db-impl"
Yigit Boyar450ed382017-03-02 09:48:25 -080067project(':room:db-impl').projectDir = new File(supportRoot, "room/db-impl")
Yigit Boyar2eb51992016-12-13 15:00:07 -080068
69include ':room:integration-tests:testapp'
Yigit Boyar450ed382017-03-02 09:48:25 -080070project(':room:integration-tests:testapp').projectDir = new File(supportRoot, "room/integration-tests/testapp")
71
72/////////////////////////////
73//
74// SupportLib
75//
76/////////////////////////////
77if (inAppToolkitProject && System.getenv("USE_SUPPORT_LIB_SOURCE")) {
78 apply from: "${supportRoot.absolutePath}/app-toolkit/settings_support_lib.gradle"
79}
Sergey Vasilinetse69e4702017-02-10 02:26:10 -080080
81/////////////////////////////
82//
83// External
84//
85/////////////////////////////
Yigit Boyar450ed382017-03-02 09:48:25 -080086if (inAppToolkitProject) {
87 File externalRoot = new File(supportRoot, '../../external')
Sergey Vasilinetse69e4702017-02-10 02:26:10 -080088
Yigit Boyar450ed382017-03-02 09:48:25 -080089 include ':doclava'
90 project(':doclava').projectDir = new File(externalRoot, 'doclava')
Sergey Vasilinetse69e4702017-02-10 02:26:10 -080091
Yigit Boyar450ed382017-03-02 09:48:25 -080092 include ':jdiff'
93 project(':jdiff').projectDir = new File(externalRoot, 'jdiff')
94}