| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 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 | |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 17 | import androidx.build.LibraryGroups |
| Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 18 | import androidx.build.LibraryType |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 19 | |
| 20 | import static androidx.build.dependencies.DependenciesKt.* |
| 21 | |
| 22 | plugins { |
| 23 | id("AndroidXPlugin") |
| 24 | id("kotlin") |
| 25 | } |
| 26 | |
| 27 | dependencies { |
| 28 | // compileOnly because we use lintChecks and it doesn't allow other types of deps |
| 29 | // this ugly hack exists because of b/63873667 |
| 30 | if (rootProject.hasProperty("android.injected.invoked.from.ide")) { |
| Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame^] | 31 | compileOnly(LINT_API_LATEST) |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 32 | } else { |
| Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame^] | 33 | compileOnly(LINT_API_MIN) |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 34 | } |
| Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame^] | 35 | compileOnly(KOTLIN_STDLIB) |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 36 | |
| Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame^] | 37 | testImplementation(KOTLIN_STDLIB) |
| 38 | testImplementation(LINT_CORE) |
| 39 | testImplementation(LINT_TESTS) |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | androidx { |
| 43 | name = "RecyclerView Lint Checks" |
| Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 44 | type = LibraryType.LINT |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 45 | mavenGroup = LibraryGroups.RECYCLERVIEW |
| 46 | inceptionYear = "2020" |
| 47 | description = "RecyclerView Lint Checks" |
| Rahul Ravikumar | 95a5d63 | 2020-02-12 16:21:49 -0800 | [diff] [blame] | 48 | } |