blob: 2ad98d0d26e177fd7a1ddd499c4ff8211a27b9cb [file] [log] [blame]
Jeff Gastone3be4aa2018-01-17 19:11:11 -05001/*
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://.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) {
27String buildScriptDir = buildscript.sourceFile.parent
28File externalRoot = new File(buildScriptDir, '../../external')
29
30includeBuild(new File(externalRoot, 'doclava'))
Jeff Gastone3be4aa2018-01-17 19:11:11 -050031}
32
33