blob: 34c8638b1fe7479a9935849f7a378ca2dd475fb1 [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 */
16import com.android.builder.core.BuilderConstants
17apply plugin: 'com.android.library'
18apply plugin: 'maven'
19
20android {
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
49dependencies {
50 compile libs.support.core_utils
51 compile libs.support.fragments
52
53 testCompile libs.junit
54 testCompile libs.mockito.all
55 testCompile(libs.test_runner) {
56 exclude module: 'support-annotations'
57 }
58 androidTestCompile(libs.espresso_core, {
59 exclude group: 'com.android.support', module: 'support-annotations'
60 })
61}
62
63uploadArchives {
64 repositories {
65 mavenDeployer {
66 repository(url: rootProject.ext.localMavenRepo)
67 pom.artifactId = "runtime"
68 }
69 }
70}
71
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}