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 { |
Ian Lake | 3b57556 | 2019-03-14 15:54:43 -0700 | [diff] [blame] | 34 | api("androidx.core:core:1.0.1") |
Ian Lake | e4aebd4 | 2019-03-14 16:09:16 -0700 | [diff] [blame] | 35 | implementation(ANDROIDX_COLLECTION) |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 36 | |
| 37 | testImplementation(JUNIT) |
| 38 | testImplementation(MOCKITO_CORE) |
Alan Viverette | badf2f8 | 2018-12-18 12:14:10 -0500 | [diff] [blame] | 39 | testImplementation(TEST_EXT_JUNIT) |
| 40 | testImplementation(TEST_CORE) |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 41 | testImplementation(TEST_RUNNER) |
Ian Lake | f32b866 | 2018-10-17 22:25:07 -0700 | [diff] [blame] | 42 | testImplementation(TRUTH) |
Ian Lake | ca44a77 | 2018-09-28 14:26:04 -0700 | [diff] [blame] | 43 | testImplementation(KOTLIN_STDLIB) |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 44 | |
Alan Viverette | badf2f8 | 2018-12-18 12:14:10 -0500 | [diff] [blame] | 45 | androidTestImplementation(TEST_EXT_JUNIT) |
| 46 | androidTestImplementation(TEST_CORE) |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 47 | androidTestImplementation(TEST_RUNNER) |
| 48 | androidTestImplementation(ESPRESSO_CORE) |
Ian Lake | f32b866 | 2018-10-17 22:25:07 -0700 | [diff] [blame] | 49 | androidTestImplementation(TRUTH) |
Ian Lake | d915c5e | 2018-06-26 13:04:46 -0700 | [diff] [blame] | 50 | androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) |
| 51 | androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) |
Ian Lake | ca44a77 | 2018-09-28 14:26:04 -0700 | [diff] [blame] | 52 | androidTestImplementation(KOTLIN_STDLIB) |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | //used by testCompile safe-args-generator |
| 56 | android.libraryVariants.all { variant -> |
Oussama Ben Abdelbaki | 892e5b0 | 2018-10-23 22:08:30 +0000 | [diff] [blame] | 57 | def name = variant.name |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 58 | def suffix = name.capitalize() |
| 59 | project.tasks.create(name: "jar${suffix}", type: Jar){ |
Oussama Ben Abdelbaki | bb9937c | 2019-02-01 15:26:13 -0500 | [diff] [blame] | 60 | dependsOn variant.javaCompileProvider.get() |
| 61 | from variant.javaCompileProvider.get().destinationDir |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 62 | destinationDir new File(project.buildDir, "libJar") |
| 63 | } |
| 64 | } |
| 65 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame^] | 66 | androidx { |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 67 | name = "Android Navigation Common" |
Ian Lake | 7a092bb | 2018-04-30 21:58:10 -0700 | [diff] [blame] | 68 | publish = true |
Ian Lake | 7892d6f | 2018-02-14 12:12:24 -0800 | [diff] [blame] | 69 | mavenVersion = LibraryVersions.NAVIGATION |
| 70 | mavenGroup = LibraryGroups.NAVIGATION |
| 71 | inceptionYear = "2017" |
| 72 | description = "Android Navigation-Common" |
| 73 | url = SupportLibraryExtension.ARCHITECTURE_URL |
| 74 | } |