Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2016 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 android.support.dependencies.DependenciesKt.* |
| 18 | import android.support.LibraryGroups |
| 19 | import android.support.LibraryVersions |
| 20 | import android.support.SupportLibraryExtension |
| 21 | |
| 22 | plugins { |
| 23 | id("SupportAndroidLibraryPlugin") |
| 24 | } |
| 25 | |
| 26 | dependencies { |
| 27 | api(SUPPORT_COMPAT) |
| 28 | |
| 29 | testImplementation(JUNIT) |
| 30 | testImplementation(MOCKITO_CORE) |
| 31 | testImplementation(TEST_RUNNER) |
| 32 | |
| 33 | androidTestImplementation(TEST_RUNNER) |
| 34 | androidTestImplementation(ESPRESSO_CORE) |
| 35 | } |
| 36 | |
| 37 | //used by testCompile safe-args-generator |
| 38 | android.libraryVariants.all { variant -> |
| 39 | def name = variant.buildType.name |
| 40 | def suffix = name.capitalize() |
| 41 | project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 42 | dependsOn variant.javaCompile |
| 43 | from variant.javaCompile.destinationDir |
| 44 | destinationDir new File(project.buildDir, "libJar") |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | supportLibrary { |
| 49 | name = "Android Navigation Common" |
| 50 | publish = true |
| 51 | mavenVersion = LibraryVersions.NAVIGATION |
| 52 | mavenGroup = LibraryGroups.NAVIGATION |
| 53 | inceptionYear = "2017" |
| 54 | description = "Android Navigation-Common" |
| 55 | url = SupportLibraryExtension.ARCHITECTURE_URL |
| 56 | } |