Adam Powell | b15ee75 | 2017-01-20 16:47:59 -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 | */ |
Sergey Vasilinets | eb9d04ce | 2017-09-18 15:59:33 -0700 | [diff] [blame] | 16 | |
| 17 | import android.support.LibraryVersions |
| 18 | import android.support.SupportLibraryExtension |
| 19 | |
Aurimas Liutikas | 3ba8693 | 2017-11-07 03:46:07 +0000 | [diff] [blame^] | 20 | plugins { |
| 21 | id("SupportAndroidLibraryPlugin") |
| 22 | } |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 23 | |
| 24 | android { |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 25 | defaultConfig { |
| 26 | minSdkVersion flatfoot.min_sdk |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | testOptions { |
| 30 | unitTests.returnDefaultValues = true |
| 31 | } |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | dependencies { |
| 35 | compile libs.support.core_utils |
| 36 | compile libs.support.fragments |
| 37 | |
| 38 | testCompile libs.junit |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame] | 39 | testCompile libs.mockito_core |
| 40 | |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 41 | testCompile(libs.test_runner) { |
| 42 | exclude module: 'support-annotations' |
| 43 | } |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame] | 44 | |
| 45 | androidTestCompile(libs.test_runner) { |
| 46 | exclude module: 'support-annotations' |
| 47 | } |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 48 | androidTestCompile(libs.espresso_core, { |
| 49 | exclude group: 'com.android.support', module: 'support-annotations' |
| 50 | }) |
| 51 | } |
| 52 | |
Ian Lake | 83cf00c | 2017-07-24 12:32:01 -0700 | [diff] [blame] | 53 | createAndroidCheckstyle(project) |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 54 | |
| 55 | android.libraryVariants.all { variant -> |
| 56 | def name = variant.buildType.name |
| 57 | def suffix = name.capitalize() |
| 58 | def jarTask = 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 | } |
Sergey Vasilinets | eb9d04ce | 2017-09-18 15:59:33 -0700 | [diff] [blame] | 64 | |
| 65 | version = LibraryVersions.NAVIGATION.toString() |
| 66 | supportLibrary { |
| 67 | name 'Android Navigation Runtime' |
| 68 | publish true |
| 69 | inceptionYear '2017' |
| 70 | description "Android Navigation-Runtime" |
| 71 | url SupportLibraryExtension.ARCHITECTURE_URL |
| 72 | } |