Matthew Fraschilla | 9e447b8 | 2019-10-01 10:06:38 -0700 | [diff] [blame] | 1 | /* |
| 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 | import static androidx.build.dependencies.DependenciesKt.* |
| 18 | import androidx.build.AndroidXExtension |
| 19 | import androidx.build.CompilationTarget |
| 20 | import androidx.build.LibraryGroups |
| 21 | import androidx.build.LibraryVersions |
| 22 | import androidx.build.SdkHelperKt |
| 23 | import androidx.build.Publish |
| 24 | |
| 25 | plugins { |
| 26 | id("AndroidXPlugin") |
| 27 | id("kotlin") |
| 28 | } |
| 29 | |
Matthew Fraschilla | 9e447b8 | 2019-10-01 10:06:38 -0700 | [diff] [blame] | 30 | dependencies { |
| 31 | // compileOnly because we use lintChecks and it doesn't allow other types of deps |
| 32 | // this ugly hack exists because of b/63873667 |
| 33 | if (rootProject.hasProperty("android.injected.invoked.from.ide")) { |
| 34 | compileOnly LINT_API_LATEST |
| 35 | } else { |
| 36 | compileOnly LINT_API_MIN |
| 37 | } |
| 38 | compileOnly KOTLIN_STDLIB |
| 39 | |
| 40 | testImplementation KOTLIN_STDLIB |
| 41 | testImplementation LINT_CORE |
| 42 | testImplementation LINT_TESTS |
| 43 | } |
| 44 | |
| 45 | androidx { |
| 46 | name = "Android Fragment Lint Checks" |
| 47 | toolingProject = true |
| 48 | publish = Publish.NONE |
Matthew Fraschilla | 9e447b8 | 2019-10-01 10:06:38 -0700 | [diff] [blame] | 49 | mavenGroup = LibraryGroups.FRAGMENT |
| 50 | inceptionYear = "2019" |
| 51 | description = "Android Fragment Lint Checks" |
Matthew Fraschilla | 9e447b8 | 2019-10-01 10:06:38 -0700 | [diff] [blame] | 52 | compilationTarget = CompilationTarget.HOST |
| 53 | } |