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 | |
| 20 | apply plugin: android.support.FlatfootAndroidLibraryPlugin |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 21 | |
| 22 | android { |
| 23 | compileSdkVersion tools.current_sdk |
| 24 | buildToolsVersion tools.build_tools_version |
| 25 | |
| 26 | defaultConfig { |
| 27 | minSdkVersion flatfoot.min_sdk |
| 28 | targetSdkVersion tools.current_sdk |
| 29 | versionCode 1 |
| 30 | versionName "1.0" |
| 31 | |
| 32 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 33 | |
| 34 | } |
| 35 | buildTypes { |
| 36 | release { |
| 37 | minifyEnabled false |
| 38 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | testOptions { |
| 43 | unitTests.returnDefaultValues = true |
| 44 | } |
| 45 | compileOptions { |
| 46 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 47 | targetCompatibility JavaVersion.VERSION_1_7 |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | dependencies { |
| 52 | compile libs.support.core_utils |
| 53 | compile libs.support.fragments |
| 54 | |
| 55 | testCompile libs.junit |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame] | 56 | testCompile libs.mockito_core |
| 57 | |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 58 | testCompile(libs.test_runner) { |
| 59 | exclude module: 'support-annotations' |
| 60 | } |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame] | 61 | |
| 62 | androidTestCompile(libs.test_runner) { |
| 63 | exclude module: 'support-annotations' |
| 64 | } |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 65 | androidTestCompile(libs.espresso_core, { |
| 66 | exclude group: 'com.android.support', module: 'support-annotations' |
| 67 | }) |
| 68 | } |
| 69 | |
Ian Lake | 83cf00c | 2017-07-24 12:32:01 -0700 | [diff] [blame] | 70 | createAndroidCheckstyle(project) |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 71 | |
| 72 | android.libraryVariants.all { variant -> |
| 73 | def name = variant.buildType.name |
| 74 | def suffix = name.capitalize() |
| 75 | def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 76 | dependsOn variant.javaCompile |
| 77 | from variant.javaCompile.destinationDir |
| 78 | destinationDir new File(project.buildDir, "libJar") |
| 79 | } |
| 80 | } |
Sergey Vasilinets | eb9d04ce | 2017-09-18 15:59:33 -0700 | [diff] [blame^] | 81 | |
| 82 | version = LibraryVersions.NAVIGATION.toString() |
| 83 | supportLibrary { |
| 84 | name 'Android Navigation Runtime' |
| 85 | publish true |
| 86 | inceptionYear '2017' |
| 87 | description "Android Navigation-Runtime" |
| 88 | url SupportLibraryExtension.ARCHITECTURE_URL |
| 89 | } |