blob: 025b801090936c39e161947d0fca7019de4df062 [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 */
Adam Powellb15ee752017-01-20 16:47:59 -080016apply plugin: 'com.android.library'
17apply plugin: 'maven'
18
19android {
20 compileSdkVersion tools.current_sdk
21 buildToolsVersion tools.build_tools_version
22
23 defaultConfig {
24 minSdkVersion flatfoot.min_sdk
25 targetSdkVersion tools.current_sdk
26 versionCode 1
27 versionName "1.0"
28
29 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30
31 }
32 buildTypes {
33 release {
34 minifyEnabled false
35 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36 }
37 }
38
39 testOptions {
40 unitTests.returnDefaultValues = true
41 }
42 compileOptions {
43 sourceCompatibility JavaVersion.VERSION_1_7
44 targetCompatibility JavaVersion.VERSION_1_7
45 }
46}
47
48dependencies {
49 compile libs.support.core_utils
50 compile libs.support.fragments
51
52 testCompile libs.junit
Ian Lake1ed814b52017-05-24 16:04:44 -070053 testCompile libs.mockito_core
54
Adam Powellb15ee752017-01-20 16:47:59 -080055 testCompile(libs.test_runner) {
56 exclude module: 'support-annotations'
57 }
Ian Lake1ed814b52017-05-24 16:04:44 -070058
59 androidTestCompile(libs.test_runner) {
60 exclude module: 'support-annotations'
61 }
Adam Powellb15ee752017-01-20 16:47:59 -080062 androidTestCompile(libs.espresso_core, {
63 exclude group: 'com.android.support', module: 'support-annotations'
64 })
65}
66
Ian Lake83cf00c2017-07-24 12:32:01 -070067createAndroidCheckstyle(project)
68version = "0.5.0-SNAPSHOT"
Adam Powellb15ee752017-01-20 16:47:59 -080069
70android.libraryVariants.all { variant ->
71 def name = variant.buildType.name
72 def suffix = name.capitalize()
73 def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){
74 dependsOn variant.javaCompile
75 from variant.javaCompile.destinationDir
76 destinationDir new File(project.buildDir, "libJar")
77 }
78}