blob: 86f6809e9c001726afb7c538b0616dbfd3041440 [file] [log] [blame]
Yigit Boyar937a77c2016-12-08 23:29:56 -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 */
Aurimas Liutikase4741f32017-07-14 17:32:12 -070016
Yigit Boyar937a77c2016-12-08 23:29:56 -080017apply plugin: 'com.android.library'
18apply plugin: 'maven'
19
20android {
Yigit Boyar450ed382017-03-02 09:48:25 -080021 compileSdkVersion tools.current_sdk
22 buildToolsVersion tools.build_tools_version
Yigit Boyar937a77c2016-12-08 23:29:56 -080023
24 defaultConfig {
Yigit Boyar450ed382017-03-02 09:48:25 -080025 minSdkVersion flatfoot.min_sdk
26 targetSdkVersion tools.current_sdk
Yigit Boyar937a77c2016-12-08 23:29:56 -080027 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
Yigit Boyar937a77c2016-12-08 23:29:56 -080049dependencies {
Yigit Boyar450ed382017-03-02 09:48:25 -080050 compile libs.support.annotations
Yigit Boyar2eb51992016-12-13 15:00:07 -080051 compile project(":room:db")
Yigit Boyar937a77c2016-12-08 23:29:56 -080052}
53createAndroidCheckstyle(project)
54
55android.libraryVariants.all { variant ->
56 def name = variant.buildType.name
57 def suffix = name.capitalize()
58 def jarTask = project.tasks.create(name: "jar${suffix}", type: Jar){
59 dependsOn variant.javaCompile
60 from variant.javaCompile.destinationDir
61 destinationDir new File(project.buildDir, "libJar")
62 }
63}