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 | */ |
| 16 | import com.android.builder.core.BuilderConstants |
| 17 | apply plugin: 'com.android.library' |
| 18 | apply plugin: 'maven' |
| 19 | |
| 20 | android { |
| 21 | compileSdkVersion tools.current_sdk |
| 22 | buildToolsVersion tools.build_tools_version |
| 23 | |
| 24 | defaultConfig { |
| 25 | minSdkVersion flatfoot.min_sdk |
| 26 | targetSdkVersion tools.current_sdk |
| 27 | versionCode 1 |
| 28 | versionName "1.0" |
| 29 | |
| 30 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
| 31 | |
| 32 | } |
| 33 | buildTypes { |
| 34 | release { |
| 35 | minifyEnabled false |
| 36 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | testOptions { |
| 41 | unitTests.returnDefaultValues = true |
| 42 | } |
| 43 | compileOptions { |
| 44 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 45 | targetCompatibility JavaVersion.VERSION_1_7 |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | dependencies { |
| 50 | compile libs.support.core_utils |
| 51 | compile libs.support.fragments |
| 52 | |
| 53 | testCompile libs.junit |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame^] | 54 | testCompile libs.mockito_core |
| 55 | |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 56 | testCompile(libs.test_runner) { |
| 57 | exclude module: 'support-annotations' |
| 58 | } |
Ian Lake | 1ed814b5 | 2017-05-24 16:04:44 -0700 | [diff] [blame^] | 59 | |
| 60 | androidTestCompile(libs.test_runner) { |
| 61 | exclude module: 'support-annotations' |
| 62 | } |
Adam Powell | b15ee75 | 2017-01-20 16:47:59 -0800 | [diff] [blame] | 63 | androidTestCompile(libs.espresso_core, { |
| 64 | exclude group: 'com.android.support', module: 'support-annotations' |
| 65 | }) |
| 66 | } |
| 67 | |
| 68 | uploadArchives { |
| 69 | repositories { |
| 70 | mavenDeployer { |
| 71 | repository(url: rootProject.ext.localMavenRepo) |
| 72 | pom.artifactId = "runtime" |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | android.libraryVariants.all { variant -> |
| 78 | def name = variant.buildType.name |
| 79 | def suffix = name.capitalize() |
| 80 | def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){ |
| 81 | dependsOn variant.javaCompile |
| 82 | from variant.javaCompile.destinationDir |
| 83 | destinationDir new File(project.buildDir, "libJar") |
| 84 | } |
| 85 | } |
Yigit Boyar | 9e18e7e | 2017-03-07 11:24:47 -0800 | [diff] [blame] | 86 | |
| 87 | // remove when we want to ship navigation |
| 88 | project.ext.noDocs = true |