blob: 30df98ce17c6e1b7381caa5dee1845845a054f1b [file] [log] [blame]
Ian Lake7892d6f2018-02-14 12:12:24 -08001/*
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 Vasilinets98971a72018-04-18 10:33:33 -070017import static androidx.build.dependencies.DependenciesKt.*
18import androidx.build.LibraryGroups
19import androidx.build.LibraryVersions
20import androidx.build.SupportLibraryExtension
Ian Lake7892d6f2018-02-14 12:12:24 -080021
22plugins {
23 id("SupportAndroidLibraryPlugin")
Ian Lakeca44a772018-09-28 14:26:04 -070024 id("kotlin-android")
Ian Lake7892d6f2018-02-14 12:12:24 -080025}
26
Jake Whartona74eeec2018-08-04 03:06:13 -040027android {
28 lintOptions {
29 fatal("UnknownNullness")
30 }
31}
32
Ian Lake7892d6f2018-02-14 12:12:24 -080033dependencies {
Sergey Vasilinets98971a72018-04-18 10:33:33 -070034 api(NAV_SUPPORT_COMPAT)
Ian Lake7892d6f2018-02-14 12:12:24 -080035
36 testImplementation(JUNIT)
37 testImplementation(MOCKITO_CORE)
Alan Viverettebadf2f82018-12-18 12:14:10 -050038 testImplementation(TEST_EXT_JUNIT)
39 testImplementation(TEST_CORE)
Ian Lake7892d6f2018-02-14 12:12:24 -080040 testImplementation(TEST_RUNNER)
Ian Lakef32b8662018-10-17 22:25:07 -070041 testImplementation(TRUTH)
Ian Lakeca44a772018-09-28 14:26:04 -070042 testImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080043
Alan Viverettebadf2f82018-12-18 12:14:10 -050044 androidTestImplementation(TEST_EXT_JUNIT)
45 androidTestImplementation(TEST_CORE)
Ian Lake7892d6f2018-02-14 12:12:24 -080046 androidTestImplementation(TEST_RUNNER)
47 androidTestImplementation(ESPRESSO_CORE)
Ian Lakef32b8662018-10-17 22:25:07 -070048 androidTestImplementation(TRUTH)
Ian Laked915c5e2018-06-26 13:04:46 -070049 androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
50 androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
Ian Lakeca44a772018-09-28 14:26:04 -070051 androidTestImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080052}
53
54//used by testCompile safe-args-generator
55android.libraryVariants.all { variant ->
Oussama Ben Abdelbaki892e5b02018-10-23 22:08:30 +000056 def name = variant.name
Ian Lake7892d6f2018-02-14 12:12:24 -080057 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
65supportLibrary {
66 name = "Android Navigation Common"
Ian Lake7a092bb2018-04-30 21:58:10 -070067 publish = true
Ian Lake7892d6f2018-02-14 12:12:24 -080068 mavenVersion = LibraryVersions.NAVIGATION
69 mavenGroup = LibraryGroups.NAVIGATION
70 inceptionYear = "2017"
71 description = "Android Navigation-Common"
72 url = SupportLibraryExtension.ARCHITECTURE_URL
73}