blob: 817b552850ca3cf7aa058edf303016399e554757 [file] [log] [blame]
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Calling includeProject(name, filePath) is shorthand for:
//
// include(name)
// project(name).projectDir = new File(filePath)
//
// Note that <name> directly controls the Gradle project name, and also indirectly sets:
// the project name in the IDE
// the Maven artifactId
//
def includeProject(name, filePath) {
settings.include(name)
def file
if (filePath instanceof String) {
file = new File(filePath)
} else {
file = filePath
}
project(name).projectDir = file
}
// If you change this file, you should also change the settings gradle inside
// the sub project.
def inAppToolkitProject = rootProject.name == "app-toolkit"
def supportRoot
if (inAppToolkitProject) {
supportRoot = new File(rootProject.projectDir, "..").getCanonicalFile()
} else {
supportRoot = rootProject.projectDir
}
println "support root:${supportRoot}"
includeProject(":arch:core-common", new File(supportRoot, "app-toolkit/common"))
includeProject(":arch:core-testing", new File(supportRoot, "app-toolkit/core-testing"))
includeProject(":arch:core-runtime", new File(supportRoot, "app-toolkit/runtime"))
includeProject(":lifecycle:integration-tests:testapp", new File(supportRoot, "lifecycle/integration-tests/testapp"))
includeProject(":lifecycle:lifecycle-common", new File(supportRoot, "lifecycle/common"))
includeProject(":lifecycle:lifecycle-common-java8", new File(supportRoot, "lifecycle/common-java8"))
includeProject(":lifecycle:lifecycle-compiler", new File(supportRoot, "lifecycle/compiler"))
includeProject(":lifecycle:lifecycle-extensions", new File(supportRoot, "lifecycle/extensions"))
includeProject(":lifecycle:lifecycle-livedata-core", new File(supportRoot, "lifecycle/livedata-core"))
includeProject(":lifecycle:lifecycle-livedata", new File(supportRoot, "lifecycle/livedata"))
includeProject(":lifecycle:lifecycle-process", new File(supportRoot, "lifecycle/process"))
includeProject(":lifecycle:lifecycle-reactivestreams", new File(supportRoot, "lifecycle/reactivestreams"))
includeProject(":lifecycle:lifecycle-reactivestreams-ktx", new File(supportRoot, "lifecycle/reactivestreams/ktx"))
includeProject(":lifecycle:lifecycle-runtime", new File(supportRoot, "lifecycle/runtime"))
includeProject(":lifecycle:lifecycle-service", new File(supportRoot, "lifecycle/service"))
includeProject(":lifecycle:lifecycle-viewmodel", new File(supportRoot, "lifecycle/viewmodel"))
includeProject(":paging:integration-tests:testapp", new File(supportRoot, "paging/integration-tests/testapp"))
includeProject(":paging:paging-common", new File(supportRoot, "paging/common"))
includeProject(":paging:paging-runtime", new File(supportRoot, "paging/runtime"))
includeProject(":paging:paging-rxjava2", new File(supportRoot, "paging/rxjava2"))
includeProject(":room:integration-tests:testapp", new File(supportRoot, "room/integration-tests/testapp"))
includeProject(":room:integration-tests:kotlintestapp", new File(supportRoot, "room/integration-tests/kotlintestapp"))
includeProject(":room:room-common", new File(supportRoot, "room/common"))
includeProject(":room:room-compiler", new File(supportRoot, "room/compiler"))
includeProject(":room:room-guava", new File(supportRoot, "room/guava"))
includeProject(":room:room-migration", new File(supportRoot, "room/migration"))
includeProject(":room:room-runtime", new File(supportRoot, "room/runtime"))
includeProject(":room:room-rxjava2", new File(supportRoot, "room/rxjava2"))
includeProject(":room:room-testing", new File(supportRoot, "room/testing"))
includeProject(":sqlite:sqlite", new File(supportRoot, "persistence/db"))
includeProject(":sqlite:sqlite-framework", new File(supportRoot, "persistence/db-framework"))
includeProject(":sqlite:sqlite-ktx", new File(supportRoot, "persistence/db/ktx"))
includeProject(":jetifier-core", new File(supportRoot, "jetifier/jetifier/core"))
includeProject(":jetifier-processor", new File(supportRoot, "jetifier/jetifier/processor"))
includeProject(":jetifier-gradle-plugin", new File(supportRoot, "jetifier/jetifier/gradle-plugin"))
includeProject(":jetifier-standalone", new File(supportRoot, "jetifier/jetifier/standalone"))
includeProject(":jetifier-preprocessor", new File(supportRoot, "jetifier/jetifier/preprocessor"))
includeProject(":navigation:navigation-common", new File(supportRoot, "navigation/common"))
includeProject(":navigation:navigation-common-ktx", new File(supportRoot, "navigation/common/ktx"))
includeProject(":navigation:navigation-runtime", new File(supportRoot, "navigation/runtime/"))
includeProject(":navigation:navigation-runtime-ktx", new File(supportRoot, "navigation/runtime/ktx"))
includeProject(":navigation:navigation-testing", new File(supportRoot, "navigation/testing"))
includeProject(":navigation:navigation-testing-ktx", new File(supportRoot, "navigation/testing/ktx"))
includeProject(":navigation:navigation-fragment", new File(supportRoot, "navigation/fragment"))
includeProject(":navigation:navigation-fragment-ktx", new File(supportRoot, "navigation/fragment/ktx"))
includeProject(":navigation:navigation-ui", new File(supportRoot, "navigation/ui"))
includeProject(":navigation:navigation-ui-ktx", new File(supportRoot, "navigation/ui/ktx"))
includeProject(":navigation:navigation-integration-tests:testapp", new File(supportRoot, "navigation/integration-tests/testapp"))
includeProject(":navigation:navigation-safe-args-generator", new File(supportRoot, "navigation/safe-args-generator"))
includeProject(":navigation:navigation-safe-args-gradle-plugin", new File(supportRoot, "navigation/safe-args-gradle-plugin"))
includeProject(":work:work-runtime", new File(supportRoot, "work/workmanager"))
includeProject(":work:work-runtime-ktx", new File(supportRoot, "work/workmanager-ktx"))
includeProject(":work:work-firebase", new File(supportRoot, "work/workmanager-firebase"))
includeProject(":work:work-testing", new File(supportRoot, "work/workmanager-test"))
includeProject(":work:integration-tests:testapp", new File(supportRoot, "work/integration-tests/testapp"))
/////////////////////////////
//
// External
//
/////////////////////////////
apply(from: new File(supportRoot, 'include-composite-deps.gradle'))
// fake project which is used for docs generation from prebuilts
// we need real android project to generate R.java, aidl etc files that mentioned in sources
if (!startParameter.projectProperties.containsKey('android.injected.invoked.from.ide')) {
// we don't need it in ide, so we don't configure it there
includeProject(":docs-fake", new File(supportRoot, "docs-fake"))
}