| 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 | |
| Sergey Vasilinets | 98971a7 | 2018-04-18 10:33:33 -0700 | [diff] [blame] | 17 | import static androidx.build.dependencies.DependenciesKt.* |
| 18 | import androidx.build.LibraryGroups |
| 19 | import androidx.build.LibraryVersions |
| 20 | import androidx.build.SupportLibraryExtension |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 21 | |
| 22 | plugins { |
| 23 | id("SupportAndroidLibraryPlugin") |
| Ian Lake | ca44a77 | 2018-09-28 14:26:04 -0700 | [diff] [blame] | 24 | id("kotlin-android") |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 25 | } |
| 26 | |
| Jake Wharton | a74eeec | 2018-08-04 03:06:13 -0400 | [diff] [blame] | 27 | android { |
| 28 | lintOptions { |
| 29 | fatal("UnknownNullness") |
| 30 | } |
| 31 | } |
| 32 | |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 33 | dependencies { |
| Sergey Vasilinets | 98971a7 | 2018-04-18 10:33:33 -0700 | [diff] [blame] | 34 | api(NAV_SUPPORT_COMPAT) |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 35 | |
| 36 | testImplementation(JUNIT) |
| 37 | testImplementation(MOCKITO_CORE) |
| Alan Viverette | badf2f8 | 2018-12-18 12:14:10 -0500 | [diff] [blame^] | 38 | testImplementation(TEST_EXT_JUNIT) |
| 39 | testImplementation(TEST_CORE) |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 40 | testImplementation(TEST_RUNNER) |
| Ian Lake | f32b866 | 2018-10-17 22:25:07 -0700 | [diff] [blame] | 41 | testImplementation(TRUTH) |
| Ian Lake | ca44a77 | 2018-09-28 14:26:04 -0700 | [diff] [blame] | 42 | testImplementation(KOTLIN_STDLIB) |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 43 | |
| Alan Viverette | badf2f8 | 2018-12-18 12:14:10 -0500 | [diff] [blame^] | 44 | androidTestImplementation(TEST_EXT_JUNIT) |
| 45 | androidTestImplementation(TEST_CORE) |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 46 | androidTestImplementation(TEST_RUNNER) |
| 47 | androidTestImplementation(ESPRESSO_CORE) |
| Ian Lake | f32b866 | 2018-10-17 22:25:07 -0700 | [diff] [blame] | 48 | androidTestImplementation(TRUTH) |
| Ian Lake | d915c5e | 2018-06-26 13:04:46 -0700 | [diff] [blame] | 49 | androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) |
| 50 | androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) |
| Ian Lake | ca44a77 | 2018-09-28 14:26:04 -0700 | [diff] [blame] | 51 | androidTestImplementation(KOTLIN_STDLIB) |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | //used by testCompile safe-args-generator |
| 55 | android.libraryVariants.all { variant -> |
| Oussama Ben Abdelbaki | 892e5b0 | 2018-10-23 22:08:30 +0000 | [diff] [blame] | 56 | def name = variant.name |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 57 | def suffix = name.capitalize() |
| 58 | project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 59 | dependsOn variant.javaCompile |
| 60 | from variant.javaCompile.destinationDir |
| 61 | destinationDir new File(project.buildDir, "libJar") |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | supportLibrary { |
| 66 | name = "Android Navigation Common" |
| Ian Lake | 7a092bb | 2018-04-30 21:58:10 -0700 | [diff] [blame] | 67 | publish = true |
| Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 68 | mavenVersion = LibraryVersions.NAVIGATION |
| 69 | mavenGroup = LibraryGroups.NAVIGATION |
| 70 | inceptionYear = "2017" |
| 71 | description = "Android Navigation-Common" |
| 72 | url = SupportLibraryExtension.ARCHITECTURE_URL |
| 73 | } |