blob: 77e25cf5233426a03a4d0f94287374efcae9e93c [file] [log] [blame]
Adam Powellb15ee752017-01-20 16:47:59 -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 */
Sergey Vasilinetseb9d04ce2017-09-18 15:59:33 -070016
17import android.support.LibraryVersions
18import android.support.SupportLibraryExtension
19
20apply plugin: android.support.FlatfootAndroidLibraryPlugin
Adam Powellb15ee752017-01-20 16:47:59 -080021
22android {
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
51dependencies {
52 compile libs.support.core_utils
53 compile libs.support.fragments
54
55 testCompile libs.junit
Ian Lake1ed814b52017-05-24 16:04:44 -070056 testCompile libs.mockito_core
57
Adam Powellb15ee752017-01-20 16:47:59 -080058 testCompile(libs.test_runner) {
59 exclude module: 'support-annotations'
60 }
Ian Lake1ed814b52017-05-24 16:04:44 -070061
62 androidTestCompile(libs.test_runner) {
63 exclude module: 'support-annotations'
64 }
Adam Powellb15ee752017-01-20 16:47:59 -080065 androidTestCompile(libs.espresso_core, {
66 exclude group: 'com.android.support', module: 'support-annotations'
67 })
68}
69
Ian Lake83cf00c2017-07-24 12:32:01 -070070createAndroidCheckstyle(project)
Adam Powellb15ee752017-01-20 16:47:59 -080071
72android.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 Vasilinetseb9d04ce2017-09-18 15:59:33 -070081
82version = LibraryVersions.NAVIGATION.toString()
83supportLibrary {
84 name 'Android Navigation Runtime'
85 publish true
86 inceptionYear '2017'
87 description "Android Navigation-Runtime"
88 url SupportLibraryExtension.ARCHITECTURE_URL
89}