1 /* 2 * Copyright (C) 2018 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 <lambda>null17pluginManagement { 18 repositories { 19 // Prefer mavenCentral as that has signed artifacts 20 mavenCentral() 21 gradlePluginPortal() 22 google() 23 } 24 } 25 <lambda>null26dependencyResolutionManagement { 27 repositories { 28 google() 29 mavenCentral() 30 val customLintRepo = System.getenv("LINT_REPO") 31 if (customLintRepo != null) { 32 logger.warn("Building using custom $customLintRepo maven repository") 33 maven { url = uri(customLintRepo) } 34 } 35 } 36 versionCatalogs { 37 create("libs") { 38 val lintOverride = System.getenv("LINT_VERSION") 39 if (lintOverride != null) { 40 logger.warn("Building using custom $lintOverride version of Android Lint.") 41 version("androidLint", lintOverride) 42 } 43 } 44 } 45 } 46 <lambda>null47settings.gradle.beforeProject { 48 val outDir = if (System.getenv("OUT_DIR") != null) { 49 File(System.getenv("OUT_DIR")) 50 } else { 51 File(rootDir, "../../out") 52 } 53 val suffix = "${path.replace(":", "/")}/build" 54 layout.buildDirectory.set(File(outDir, "metalava$suffix")) 55 } 56 57 if (!System.getenv("INTEGRATION").isNullOrBlank()) { 58 include(":integration") 59 } 60 61 include(":metalava") 62 include(":metalava-model") 63 include(":metalava-model-psi") 64 include(":metalava-model-source") 65 include(":metalava-model-testsuite") 66 include(":metalava-model-testsuite-cli") 67 include(":metalava-model-text") 68 include(":metalava-model-turbine") 69 include(":metalava-reporter") 70 include(":metalava-testing") 71 include(":stub-annotations") 72