1/*
2 * Copyright 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
17plugins {
18    id("SupportAndroidTestAppPlugin")
19}
20
21// replace all tests etc with empty task, so we don't run anything
22// it is more effective then task.enabled = false, because we avoid executing deps as well
23def reentrance = false
24project.tasks.whenTaskAdded { task ->
25    if (task instanceof org.gradle.api.tasks.testing.Test || task.name.startsWith("assemble")) {
26        if (!reentrance) {
27            reentrance = true
28            project.tasks.replace(task.name)
29            reentrance = false
30        }
31    }
32}
33
34android {
35    sourceSets {
36        main {
37            manifest.srcFile "AndroidManifest.xml"
38        }
39    }
40    flavorDimensions("library-group")
41}
42
43
44supportTestApp {
45    minSdkVersion = 'P'
46}