[go: nahoru, domu]

blob: 47e140b2d4f9089bb972582a089ec4bfaac2fba2 [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
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070020import androidx.build.AndroidXExtension
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070021import androidx.build.Publish
Ian Lake7892d6f2018-02-14 12:12:24 -080022
23plugins {
Aurimas Liutikascdb9f9f2019-04-08 12:07:49 +010024 id("AndroidXPlugin")
25 id("com.android.library")
Ian Lakeca44a772018-09-28 14:26:04 -070026 id("kotlin-android")
Ian Lake7892d6f2018-02-14 12:12:24 -080027}
28
29dependencies {
Ian Lakeae48ec22019-09-26 15:57:41 -070030 api("androidx.annotation:annotation:1.1.0")
Jake Wharton86978a52019-07-09 17:01:22 -040031 implementation("androidx.core:core:1.0.1")
Ian Lakeae48ec22019-09-26 15:57:41 -070032 implementation("androidx.collection:collection:1.0.0")
Ian Lake7892d6f2018-02-14 12:12:24 -080033
34 testImplementation(JUNIT)
35 testImplementation(MOCKITO_CORE)
Ian Lakef32b8662018-10-17 22:25:07 -070036 testImplementation(TRUTH)
Ian Lakeca44a772018-09-28 14:26:04 -070037 testImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080038
Dustin Lam3979d962019-04-08 10:40:19 -070039 androidTestImplementation(ANDROIDX_TEST_EXT_JUNIT)
40 androidTestImplementation(ANDROIDX_TEST_CORE)
41 androidTestImplementation(ANDROIDX_TEST_RUNNER)
Ian Lake7892d6f2018-02-14 12:12:24 -080042 androidTestImplementation(ESPRESSO_CORE)
Ian Lakef32b8662018-10-17 22:25:07 -070043 androidTestImplementation(TRUTH)
Ian Laked915c5e2018-06-26 13:04:46 -070044 androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
45 androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
Ian Lakeca44a772018-09-28 14:26:04 -070046 androidTestImplementation(KOTLIN_STDLIB)
Ian Lake7892d6f2018-02-14 12:12:24 -080047}
48
Aurimas Liutikas8a1c0392019-12-02 11:31:04 -080049//used by testImplementation safe-args-generator
Ian Lake7892d6f2018-02-14 12:12:24 -080050android.libraryVariants.all { variant ->
Oussama Ben Abdelbaki892e5b02018-10-23 22:08:30 +000051 def name = variant.name
Ian Lake7892d6f2018-02-14 12:12:24 -080052 def suffix = name.capitalize()
53 project.tasks.create(name: "jar${suffix}", type: Jar){
Oussama Ben Abdelbakibb9937c2019-02-01 15:26:13 -050054 dependsOn variant.javaCompileProvider.get()
55 from variant.javaCompileProvider.get().destinationDir
Ian Lake7892d6f2018-02-14 12:12:24 -080056 destinationDir new File(project.buildDir, "libJar")
57 }
58}
59
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070060androidx {
Ian Lake7892d6f2018-02-14 12:12:24 -080061 name = "Android Navigation Common"
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070062 publish = Publish.SNAPSHOT_AND_RELEASE
Ian Lake7892d6f2018-02-14 12:12:24 -080063 mavenVersion = LibraryVersions.NAVIGATION
64 mavenGroup = LibraryGroups.NAVIGATION
65 inceptionYear = "2017"
66 description = "Android Navigation-Common"
Aurimas Liutikasb63ef632019-04-01 04:37:49 -070067 url = AndroidXExtension.ARCHITECTURE_URL
Ian Lake7892d6f2018-02-14 12:12:24 -080068}