blob: 8e8dea7b489fed49f1f7e11d0113069f0e44b3cc [file] [log] [blame]
Jeff Gaston8fd9fc82019-07-26 14:26:10 -04001/*
2 * Copyright 2019 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// This project contains tests for code contained in buildSrc
18// This project is stored outside of buildSrc/ so that waiting for these tests to complete doesn't delay the rest of the build
19
20import static androidx.build.dependencies.DependenciesKt.*
21import androidx.build.BuildServerConfigurationKt
22
23plugins {
24 id("AndroidXPlugin")
25 id("kotlin")
26}
27
28dependencies {
29 implementation gradleApi()
30 testImplementation JUNIT
31 implementation(project.files(new File(BuildServerConfigurationKt.getRootOutDirectory(project), "buildSrc/build/libs/buildSrc.jar")))
32}
33
34androidx {
35 toolingProject = true
36}
Jeff Gastond61ec622020-02-26 15:34:00 -050037
38// Also do style checking of the buildSrc project from within this project too
39// We run that from this project so that it doesn't block other projects while it runs
40def ktlintIncludes = "../buildSrc/src/**/*.kt"
41def ktlintInputs = project.fileTree(dir: ".", include: ktlintIncludes)
42tasks["ktlint"].configure({ t ->
43 t.inputs.files(ktlintInputs)
44 t.args = t.args + ktlintIncludes
45})
46tasks["ktlintFormat"].configure({ t ->
47 t.inputs.files(ktlintInputs)
48 t.args = t.args + ktlintIncludes
49})