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 */
16
17
18// This file is part of a a workaround for https://github.com/gradle/gradle/issues/1909 to enable
19// including this Support Library build as an included build. See include-support-library.gradle
20// for usage instructions.
21
22boolean currentBuildIsRootBuild = (gradle.parent == null)
23
24// Add included builds. This only works if this is currently the root build, so this script should
25// be applied to several builds and will only enable itself when part of the root build.
26if (currentBuildIsRootBuild) {
27  String buildScriptDir = buildscript.sourceFile.parent
28  File externalRoot = new File(buildScriptDir, '../../external')
29
30  includeBuild(new File(externalRoot, 'doclava'))
31  includeBuild(new File(externalRoot, 'jdiff'))
32}
33
34
35