[go: nahoru, domu]

blob: bf1cb79275e7e8ef962c0630cfe7936d60f7d393 [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 {
Ian Lake3b575562019-03-14 15:54:43 -070034 api("androidx.core:core:1.0.1")
Ian Lakee4aebd42019-03-14 16:09:16 -070035 implementation(ANDROIDX_COLLECTION)
Ian Lake7892d6f2018-02-14 12:12:24 -080036
37 testImplementation(JUNIT)
38 testImplementation(MOCKITO_CORE)
Alan Viverettebadf2f82018-12-18 12:14:10 -050039 testImplementation(TEST_EXT_JUNIT)
40 testImplementation(TEST_CORE)
Ian Lake7892d6f2018-02-14 12:12:24 -080041 testImplementation(TEST_RUNNER)
Ian Lakef32b8662018-10-17 22:25:07 -070042 testImplementation(TRUTH)
Ian Lakeca44a772018-09-28 14:26:04 -070043 testImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080044
Alan Viverettebadf2f82018-12-18 12:14:10 -050045 androidTestImplementation(TEST_EXT_JUNIT)
46 androidTestImplementation(TEST_CORE)
Ian Lake7892d6f2018-02-14 12:12:24 -080047 androidTestImplementation(TEST_RUNNER)
48 androidTestImplementation(ESPRESSO_CORE)
Ian Lakef32b8662018-10-17 22:25:07 -070049 androidTestImplementation(TRUTH)
Ian Laked915c5e2018-06-26 13:04:46 -070050 androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
51 androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
Ian Lakeca44a772018-09-28 14:26:04 -070052 androidTestImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080053}
54
55//used by testCompile safe-args-generator
56android.libraryVariants.all { variant ->
Oussama Ben Abdelbaki892e5b02018-10-23 22:08:30 +000057 def name = variant.name
Ian Lake7892d6f2018-02-14 12:12:24 -080058 def suffix = name.capitalize()
59 project.tasks.create(name: "jar${suffix}", type: Jar){
Oussama Ben Abdelbakibb9937c2019-02-01 15:26:13 -050060 dependsOn variant.javaCompileProvider.get()
61 from variant.javaCompileProvider.get().destinationDir
Ian Lake7892d6f2018-02-14 12:12:24 -080062 destinationDir new File(project.buildDir, "libJar")
63 }
64}
65
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070066androidx {
Ian Lake7892d6f2018-02-14 12:12:24 -080067 name = "Android Navigation Common"
Ian Lake7a092bb2018-04-30 21:58:10 -070068 publish = true
Ian Lake7892d6f2018-02-14 12:12:24 -080069 mavenVersion = LibraryVersions.NAVIGATION
70 mavenGroup = LibraryGroups.NAVIGATION
71 inceptionYear = "2017"
72 description = "Android Navigation-Common"
73 url = SupportLibraryExtension.ARCHITECTURE_URL
74}