blob: 930a1d3c64bdd94515e4a23a532f4962e58138a7 [file] [log] [blame]
Yigit Boyar5ce90e92016-12-09 18:30:13 -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 Boyar5ce90e92016-12-09 18:30:13 -080016apply plugin: 'com.android.library'
Yigit Boyar5ce90e92016-12-09 18:30:13 -080017
Sergey Vasilinetse69e4702017-02-10 02:26:10 -080018project.ext.noDocs = true
19
Yigit Boyar5ce90e92016-12-09 18:30:13 -080020android {
Yigit Boyar450ed382017-03-02 09:48:25 -080021 compileSdkVersion tools.current_sdk
22 buildToolsVersion tools.build_tools_version
Yigit Boyar5ce90e92016-12-09 18:30:13 -080023
24 defaultConfig {
Yigit Boyar450ed382017-03-02 09:48:25 -080025 minSdkVersion flatfoot.min_sdk
26 targetSdkVersion tools.current_sdk
Yigit Boyar5ce90e92016-12-09 18:30:13 -080027 versionCode 1
28 versionName "1.0"
29
30 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Yigit Boyara64756a2017-03-20 17:26:17 -070031 javaCompileOptions {
32 annotationProcessorOptions {
33 arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
34 }
35 }
Yigit Boyar5ce90e92016-12-09 18:30:13 -080036 }
37 testOptions {
38 unitTests.returnDefaultValues = true
39 }
40 compileOptions {
41 sourceCompatibility JavaVersion.VERSION_1_7
42 targetCompatibility JavaVersion.VERSION_1_7
43 }
Yigit Boyara64756a2017-03-20 17:26:17 -070044 sourceSets {
45 androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
46 }
Yigit Boyar5ce90e92016-12-09 18:30:13 -080047}
48
49dependencies {
Yigit Boyar2eb51992016-12-13 15:00:07 -080050 compile project(":room:common")
51 compile project(":room:db")
52 compile project(":room:db-impl")
53 compile project(':room:runtime')
Yigit Boyar64db0cc2017-04-17 13:18:56 -070054 compile project(':arch:core')
Yigit Boyar5ce90e92016-12-09 18:30:13 -080055
Yigit Boyar450ed382017-03-02 09:48:25 -080056 compile libs.support.app_compat
Yigit Boyar34e50312017-01-14 14:06:13 -080057 annotationProcessor project(":room:compiler")
Yigit Boyar2eb51992016-12-13 15:00:07 -080058 androidTestAnnotationProcessor project(":room:compiler")
Yigit Boyar5ce90e92016-12-09 18:30:13 -080059
Yigit Boyar450ed382017-03-02 09:48:25 -080060 androidTestCompile(libs.test_runner) {
Yigit Boyarfe127e52017-01-27 14:30:20 -080061 exclude module: 'support-annotations'
Yigit Boyar3c592c42017-04-04 14:53:04 -070062 exclude module: 'hamcrest-core'
Yigit Boyarfe127e52017-01-27 14:30:20 -080063 }
Yigit Boyar450ed382017-03-02 09:48:25 -080064 androidTestCompile(libs.espresso_core, {
Yigit Boyar5ce90e92016-12-09 18:30:13 -080065 exclude group: 'com.android.support', module: 'support-annotations'
Yigit Boyar3c592c42017-04-04 14:53:04 -070066 exclude module: "hamcrest-core"
Yigit Boyar5ce90e92016-12-09 18:30:13 -080067 })
Yigit Boyar846dfcf2017-01-16 18:05:20 -080068 // 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 Boyara64756a2017-03-20 17:26:17 -070072 androidTestCompile project(':room:testing')
Yigit Boyar3c592c42017-04-04 14:53:04 -070073 androidTestCompile project(':room:rxjava2')
74 androidTestCompile libs.rx_java
75 testCompile libs.mockito.all
Yigit Boyar5ce90e92016-12-09 18:30:13 -080076}
77
Yigit Boyar5ce90e92016-12-09 18:30:13 -080078createAndroidCheckstyle(project)
Yigit Boyar5ce90e92016-12-09 18:30:13 -080079tasks['check'].dependsOn(tasks['connectedCheck'])
Yigit Boyar450ed382017-03-02 09:48:25 -080080
81uploadArchives.enabled = false