blob: 1415d850984415eaf52a0a4d812e8007b5629e85 [file] [log] [blame]
Yigit Boyar2259e4d2016-11-25 18:26:10 -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 */
Yigit Boyarefaf86a2016-12-02 15:16:35 -080016import com.android.builder.core.BuilderConstants
Yigit Boyar2259e4d2016-11-25 18:26:10 -080017apply plugin: 'com.android.library'
Yigit Boyarefaf86a2016-12-02 15:16:35 -080018apply plugin: 'maven'
Yigit Boyar2259e4d2016-11-25 18:26:10 -080019
20android {
Yigit Boyar450ed382017-03-02 09:48:25 -080021 compileSdkVersion tools.current_sdk
22 buildToolsVersion tools.build_tools_version
Yigit Boyar2259e4d2016-11-25 18:26:10 -080023
24 defaultConfig {
Yigit Boyar450ed382017-03-02 09:48:25 -080025 minSdkVersion flatfoot.min_sdk
26 targetSdkVersion tools.current_sdk
Yigit Boyar2259e4d2016-11-25 18:26:10 -080027 versionCode 1
28 versionName "1.0"
29
30 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
31
32 }
Yigit Boyar96910512017-04-06 23:16:01 -070033
34 buildTypes.all {
35 consumerProguardFiles 'proguard-rules.pro'
36 }
37
Yigit Boyar2259e4d2016-11-25 18:26:10 -080038 buildTypes {
39 release {
40 minifyEnabled false
Yigit Boyar2259e4d2016-11-25 18:26:10 -080041 }
42 }
43
44 testOptions {
45 unitTests.returnDefaultValues = true
46 }
47 compileOptions {
48 sourceCompatibility JavaVersion.VERSION_1_7
49 targetCompatibility JavaVersion.VERSION_1_7
50 }
51}
52
53dependencies {
Yigit Boyar2eb51992016-12-13 15:00:07 -080054 compile project(":room:common")
55 compile project(":room:db")
56 compile project(":room:db-impl")
Yigit Boyar64db0cc2017-04-17 13:18:56 -070057 compile project(":arch:core")
Yigit Boyar450ed382017-03-02 09:48:25 -080058 compile libs.support.core_utils
Yigit Boyar2259e4d2016-11-25 18:26:10 -080059
Yigit Boyara64756a2017-03-20 17:26:17 -070060
Yigit Boyar64db0cc2017-04-17 13:18:56 -070061 testCompile project(":arch:core-testing")
Yigit Boyar450ed382017-03-02 09:48:25 -080062 testCompile libs.junit
Yigit Boyarb323d282017-06-28 13:58:45 -070063 testCompile libs.mockito_core
Yigit Boyara64756a2017-03-20 17:26:17 -070064 testCompile libs.support.annotations
65
66 androidTestCompile libs.junit
67 androidTestCompile(libs.test_runner) {
68 exclude module: 'support-annotations'
69 }
70 androidTestCompile(libs.espresso_core, {
71 exclude group: 'com.android.support', module: 'support-annotations'
72 })
Yigit Boyar2259e4d2016-11-25 18:26:10 -080073}
74
Yigit Boyar83ebc492017-03-08 20:43:45 -080075archivesBaseName = "runtime"
Yigit Boyarefaf86a2016-12-02 15:16:35 -080076
Yigit Boyar2259e4d2016-11-25 18:26:10 -080077createAndroidCheckstyle(project)
Yigit Boyarefaf86a2016-12-02 15:16:35 -080078
79android.libraryVariants.all { variant ->
80 def name = variant.buildType.name
81 def suffix = name.capitalize()
Sergey Vasilinets459caad2017-03-01 11:11:34 -080082 project.tasks.create(name: "jar${suffix}", type: Jar){
Yigit Boyarefaf86a2016-12-02 15:16:35 -080083 dependsOn variant.javaCompile
84 from variant.javaCompile.destinationDir
85 destinationDir new File(project.buildDir, "libJar")
86 }
87}