Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 1 | /* |
| 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 Boyar | 34e5031 | 2017-01-14 14:06:13 -0800 | [diff] [blame] | 19 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 20 | def inAppToolkitProject = rootProject.name == "app-toolkit" |
| 21 | def supportRoot |
| 22 | if (inAppToolkitProject) { |
| 23 | supportRoot = new File(rootProject.projectDir, "..").getCanonicalFile() |
| 24 | } else { |
| 25 | supportRoot = rootProject.projectDir |
| 26 | } |
Yigit Boyar | 34e5031 | 2017-01-14 14:06:13 -0800 | [diff] [blame] | 27 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 28 | println "support root:${supportRoot}" |
| 29 | |
Yigit Boyar | 8205ce1 | 2017-07-09 23:07:05 -0700 | [diff] [blame] | 30 | include ':arch:runtime' |
| 31 | project(':arch:runtime').projectDir = new File(supportRoot, "app-toolkit/runtime") |
| 32 | |
| 33 | include ':arch:common' |
| 34 | project(':arch:common').projectDir = new File(supportRoot, "app-toolkit/common") |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 35 | |
Chris Craik | 9fd8e61 | 2017-06-23 14:07:04 -0700 | [diff] [blame] | 36 | include ':paging:common' |
| 37 | project(':paging:common').projectDir = new File(supportRoot, "paging/common") |
| 38 | |
| 39 | include ":paging:runtime" |
| 40 | project(':paging:runtime').projectDir = new File(supportRoot, "paging/runtime") |
| 41 | |
| 42 | include ':paging:integration-tests:testapp' |
| 43 | project(':paging:integration-tests:testapp').projectDir = new File(supportRoot, "paging/integration-tests/testapp") |
| 44 | |
Yigit Boyar | 64db0cc | 2017-04-17 13:18:56 -0700 | [diff] [blame] | 45 | include ':arch:core-testing' |
| 46 | project(':arch:core-testing').projectDir = new File(supportRoot, "app-toolkit/core-testing") |
Sergey Vasilinets | 459caad | 2017-03-01 11:11:34 -0800 | [diff] [blame] | 47 | |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 48 | include ':lifecycle:extensions' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 49 | project(':lifecycle:extensions').projectDir = new File(supportRoot, "lifecycle/extensions") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 50 | |
Jason Neufeld | 5349f0e | 2017-02-17 11:17:55 -0800 | [diff] [blame] | 51 | include ':lifecycle:reactivestreams' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 52 | project(':lifecycle:reactivestreams').projectDir = new File(supportRoot, "lifecycle/reactivestreams") |
Jason Neufeld | 5349f0e | 2017-02-17 11:17:55 -0800 | [diff] [blame] | 53 | |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 54 | include ':lifecycle:runtime' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 55 | project(':lifecycle:runtime').projectDir = new File(supportRoot, "lifecycle/runtime") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 56 | |
| 57 | include ':lifecycle:common' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 58 | project(':lifecycle:common').projectDir = new File(supportRoot, "lifecycle/common") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 59 | |
| 60 | include ':lifecycle:compiler' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 61 | project(':lifecycle:compiler').projectDir = new File(supportRoot, "lifecycle/compiler") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 62 | |
Ian Lake | 4fa9444 | 2017-03-06 14:12:53 -0800 | [diff] [blame] | 63 | include ':lifecycle:integration-tests:testapp' |
| 64 | project(':lifecycle:integration-tests:testapp').projectDir = new File(supportRoot, "lifecycle/integration-tests/testapp") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 65 | |
| 66 | include ':room:common' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 67 | project(':room:common').projectDir = new File(supportRoot, "room/common") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 68 | |
| 69 | include ':room:runtime' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 70 | project(':room:runtime').projectDir = new File(supportRoot, "room/runtime") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 71 | |
| 72 | include ':room:compiler' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 73 | project(':room:compiler').projectDir = new File(supportRoot, "room/compiler") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 74 | |
Yigit Boyar | a64756a | 2017-03-20 17:26:17 -0700 | [diff] [blame] | 75 | include ':room:migration' |
| 76 | project(':room:migration').projectDir = new File(supportRoot, "room/migration") |
| 77 | |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 78 | include ':room:db' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 79 | project(':room:db').projectDir = new File(supportRoot, "room/db") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 80 | |
| 81 | include ":room:db-impl" |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 82 | project(':room:db-impl').projectDir = new File(supportRoot, "room/db-impl") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 83 | |
Yigit Boyar | a64756a | 2017-03-20 17:26:17 -0700 | [diff] [blame] | 84 | include ":room:testing" |
| 85 | project(':room:testing').projectDir = new File(supportRoot, "room/testing") |
| 86 | |
Yigit Boyar | 3c592c4 | 2017-04-04 14:53:04 -0700 | [diff] [blame] | 87 | include ":room:rxjava2" |
| 88 | project(':room:rxjava2').projectDir = new File(supportRoot, "room/rxjava2") |
| 89 | |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 90 | include ':room:integration-tests:testapp' |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 91 | project(':room:integration-tests:testapp').projectDir = new File(supportRoot, "room/integration-tests/testapp") |
| 92 | |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 93 | include ':room:integration-tests:kotlintestapp' |
| 94 | project(':room:integration-tests:kotlintestapp').projectDir = new File(supportRoot, "room/integration-tests/kotlintestapp") |
| 95 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 96 | ///////////////////////////// |
| 97 | // |
| 98 | // SupportLib |
| 99 | // |
| 100 | ///////////////////////////// |
| 101 | if (inAppToolkitProject && System.getenv("USE_SUPPORT_LIB_SOURCE")) { |
| 102 | apply from: "${supportRoot.absolutePath}/app-toolkit/settings_support_lib.gradle" |
| 103 | } |
Sergey Vasilinets | e69e470 | 2017-02-10 02:26:10 -0800 | [diff] [blame] | 104 | |
| 105 | ///////////////////////////// |
| 106 | // |
| 107 | // External |
| 108 | // |
| 109 | ///////////////////////////// |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 110 | if (inAppToolkitProject) { |
| 111 | File externalRoot = new File(supportRoot, '../../external') |
Sergey Vasilinets | e69e470 | 2017-02-10 02:26:10 -0800 | [diff] [blame] | 112 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 113 | include ':doclava' |
| 114 | project(':doclava').projectDir = new File(externalRoot, 'doclava') |
Sergey Vasilinets | e69e470 | 2017-02-10 02:26:10 -0800 | [diff] [blame] | 115 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 116 | include ':jdiff' |
| 117 | project(':jdiff').projectDir = new File(externalRoot, 'jdiff') |
| 118 | } |