Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -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 | */ |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 16 | apply plugin: 'com.android.library' |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 17 | |
Sergey Vasilinets | e69e470 | 2017-02-10 02:26:10 -0800 | [diff] [blame] | 18 | project.ext.noDocs = true |
| 19 | |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 20 | android { |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 21 | compileSdkVersion tools.current_sdk |
| 22 | buildToolsVersion tools.build_tools_version |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 23 | |
| 24 | defaultConfig { |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 25 | minSdkVersion flatfoot.min_sdk |
| 26 | targetSdkVersion tools.current_sdk |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 27 | versionCode 1 |
| 28 | versionName "1.0" |
| 29 | |
| 30 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Yigit Boyar | a64756a | 2017-03-20 17:26:17 -0700 | [diff] [blame] | 31 | javaCompileOptions { |
| 32 | annotationProcessorOptions { |
| 33 | arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] |
| 34 | } |
| 35 | } |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 36 | } |
| 37 | testOptions { |
| 38 | unitTests.returnDefaultValues = true |
| 39 | } |
| 40 | compileOptions { |
| 41 | sourceCompatibility JavaVersion.VERSION_1_7 |
| 42 | targetCompatibility JavaVersion.VERSION_1_7 |
| 43 | } |
Yigit Boyar | a64756a | 2017-03-20 17:26:17 -0700 | [diff] [blame] | 44 | sourceSets { |
| 45 | androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) |
| 46 | } |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | dependencies { |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 50 | compile project(":room:common") |
| 51 | compile project(":room:db") |
| 52 | compile project(":room:db-impl") |
| 53 | compile project(':room:runtime') |
Yigit Boyar | 64db0cc | 2017-04-17 13:18:56 -0700 | [diff] [blame] | 54 | compile project(':arch:core') |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 55 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 56 | compile libs.support.app_compat |
Yigit Boyar | 34e5031 | 2017-01-14 14:06:13 -0800 | [diff] [blame] | 57 | annotationProcessor project(":room:compiler") |
Yigit Boyar | 2eb5199 | 2016-12-13 15:00:07 -0800 | [diff] [blame] | 58 | androidTestAnnotationProcessor project(":room:compiler") |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 59 | |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 60 | androidTestCompile(libs.test_runner) { |
Yigit Boyar | fe127e5 | 2017-01-27 14:30:20 -0800 | [diff] [blame] | 61 | exclude module: 'support-annotations' |
Yigit Boyar | 3c592c4 | 2017-04-04 14:53:04 -0700 | [diff] [blame] | 62 | exclude module: 'hamcrest-core' |
Yigit Boyar | fe127e5 | 2017-01-27 14:30:20 -0800 | [diff] [blame] | 63 | } |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 64 | androidTestCompile(libs.espresso_core, { |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 65 | exclude group: 'com.android.support', module: 'support-annotations' |
Yigit Boyar | 3c592c4 | 2017-04-04 14:53:04 -0700 | [diff] [blame] | 66 | exclude module: "hamcrest-core" |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 67 | }) |
Yigit Boyar | 846dfcf | 2017-01-16 18:05:20 -0800 | [diff] [blame] | 68 | // IJ's gradle integration just cannot figure this out ... |
| 69 | androidTestCompile project(':lifecycle:extensions') |
| 70 | androidTestCompile project(':lifecycle:common') |
| 71 | androidTestCompile project(':lifecycle:runtime') |
Yigit Boyar | a64756a | 2017-03-20 17:26:17 -0700 | [diff] [blame] | 72 | androidTestCompile project(':room:testing') |
Yigit Boyar | 3c592c4 | 2017-04-04 14:53:04 -0700 | [diff] [blame] | 73 | androidTestCompile project(':room:rxjava2') |
| 74 | androidTestCompile libs.rx_java |
| 75 | testCompile libs.mockito.all |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 76 | } |
| 77 | |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 78 | createAndroidCheckstyle(project) |
Yigit Boyar | 5ce90e9 | 2016-12-09 18:30:13 -0800 | [diff] [blame] | 79 | tasks['check'].dependsOn(tasks['connectedCheck']) |
Yigit Boyar | 450ed38 | 2017-03-02 09:48:25 -0800 | [diff] [blame] | 80 | |
| 81 | uploadArchives.enabled = false |