| /* |
| * Copyright 2019 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. |
| */ |
| |
| // This project contains tests for code contained in buildSrc |
| // This project is stored outside of buildSrc/ so that waiting for these tests to complete doesn't delay the rest of the build |
| |
| import static androidx.build.dependencies.DependenciesKt.* |
| import androidx.build.BuildServerConfigurationKt |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("kotlin") |
| } |
| |
| dependencies { |
| implementation gradleApi() |
| testImplementation JUNIT |
| implementation(project.files(new File(BuildServerConfigurationKt.getRootOutDirectory(project), "buildSrc/build/libs/buildSrc.jar"))) |
| } |
| |
| // Also do style checking of the buildSrc project from within this project too |
| // We run that from this project so that it doesn't block other projects while it runs |
| def ktlintIncludes = "../buildSrc/src/**/*.kt" |
| def ktlintInputs = project.fileTree(dir: ".", include: ktlintIncludes) |
| tasks["ktlint"].configure({ t -> |
| t.inputs.files(ktlintInputs) |
| t.args = t.args + ktlintIncludes |
| }) |
| tasks["ktlintFormat"].configure({ t -> |
| t.inputs.files(ktlintInputs) |
| t.args = t.args + ktlintIncludes |
| }) |