Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 16 | |
| 17 | import static android.support.dependencies.DependenciesKt.* |
| 18 | |
Aurimas Liutikas | 238e480 | 2017-12-14 10:52:11 -0800 | [diff] [blame] | 19 | plugins { |
| 20 | id("SupportAndroidTestAppPlugin") |
| 21 | id("kotlin-kapt") |
| 22 | id("kotlin-android") |
| 23 | } |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 24 | |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 25 | android { |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 26 | defaultConfig { |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 27 | javaCompileOptions { |
| 28 | annotationProcessorOptions { |
| 29 | arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] |
| 30 | } |
| 31 | } |
| 32 | } |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 33 | sourceSets { |
| 34 | androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | dependencies { |
Aurimas Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 39 | implementation(project(":room:common")) |
| 40 | implementation(project(":persistence:db")) |
| 41 | implementation(project(":persistence:db-framework")) |
| 42 | implementation(project(":room:runtime")) |
| 43 | implementation(project(":arch:runtime")) |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 44 | |
Aurimas Liutikas | 1187af1 | 2017-11-28 15:28:01 -0800 | [diff] [blame] | 45 | implementation(SUPPORT_APPCOMPAT, libs.support_exclude_config) |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 46 | kaptAndroidTest project(":room:compiler") |
| 47 | |
Aurimas Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 48 | androidTestImplementation(TEST_RUNNER) { |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 49 | exclude module: 'support-annotations' |
| 50 | exclude module: 'hamcrest-core' |
| 51 | } |
Aurimas Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 52 | androidTestImplementation(ESPRESSO_CORE, { |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 53 | exclude group: 'com.android.support', module: 'support-annotations' |
| 54 | exclude module: "hamcrest-core" |
| 55 | }) |
| 56 | // IJ's gradle integration just cannot figure this out ... |
| 57 | androidTestImplementation project(':lifecycle:extensions') |
| 58 | androidTestImplementation project(':lifecycle:common') |
| 59 | androidTestImplementation project(':lifecycle:runtime') |
| 60 | androidTestImplementation project(':room:testing') |
| 61 | androidTestImplementation project(':room:rxjava2') |
| 62 | androidTestImplementation project(':arch:core-testing') |
Yigit Boyar | c71517d | 2018-02-09 13:34:18 -0800 | [diff] [blame] | 63 | androidTestImplementation(GUAVA_ANDROID) |
Aurimas Liutikas | 81b5bac | 2017-11-28 13:26:43 -0800 | [diff] [blame] | 64 | androidTestImplementation(RX_JAVA) |
Aurimas Liutikas | f4ec12f | 2017-11-22 12:55:43 -0800 | [diff] [blame] | 65 | testImplementation(MOCKITO_CORE) |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 66 | } |
| 67 | |
Florina Muntenescu | 34f575b | 2017-07-17 10:38:50 +0100 | [diff] [blame] | 68 | tasks['check'].dependsOn(tasks['connectedCheck']) |
| 69 | |
| 70 | uploadArchives.enabled = false |