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 */ 16 17import static androidx.build.dependencies.DependenciesKt.* 18 19plugins { 20 id("SupportAndroidTestAppPlugin") 21} 22 23android { 24 defaultConfig { 25 javaCompileOptions { 26 annotationProcessorOptions { 27 arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] 28 } 29 } 30 } 31 sourceSets { 32 androidTest.assets.srcDirs += files("$projectDir/schemas".toString()) 33 androidTest.assets.srcDirs += files("$projectDir/databases".toString()) 34 } 35} 36 37dependencies { 38 implementation(project(":room:room-common")) 39 implementation(project(":sqlite:sqlite")) 40 implementation(project(":sqlite:sqlite-framework")) 41 implementation(project(":room:room-runtime")) 42 implementation(project(":arch:core-runtime")) 43 implementation(project(":arch:core-common")) 44 implementation(project(":lifecycle:lifecycle-extensions")) 45 implementation(project(":lifecycle:lifecycle-runtime")) 46 implementation(project(":lifecycle:lifecycle-common")) 47 implementation(project(":room:room-rxjava2")) 48 implementation(project(":paging:paging-runtime")) 49 implementation(project(":paging:paging-rxjava2")) 50 51 implementation(SUPPORT_RECYCLERVIEW, libs.support_exclude_config) 52 implementation(SUPPORT_APPCOMPAT, libs.support_exclude_config) 53 annotationProcessor project(":room:room-compiler") 54 androidTestAnnotationProcessor project(":room:room-compiler") 55 56 // IJ's gradle integration just cannot figure this out ... 57 androidTestImplementation(project(":lifecycle:lifecycle-extensions")) 58 androidTestImplementation(project(":lifecycle:lifecycle-common")) 59 androidTestImplementation(project(":lifecycle:lifecycle-runtime")) 60 androidTestImplementation(project(":room:room-testing")) 61 androidTestImplementation(project(":room:room-rxjava2")) 62 androidTestImplementation(project(":arch:core-testing")) 63 androidTestImplementation(RX_JAVA) 64 androidTestImplementation(TEST_RUNNER) 65 androidTestImplementation(ESPRESSO_CORE) 66 androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker 67 androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy) // DexMaker has it's own MockMaker 68 69 testImplementation(JUNIT) 70} 71 72tasks['check'].dependsOn(tasks['connectedCheck']) 73 74uploadArchives.enabled = false 75 76supportTestApp { 77 // to assert that room generates somewhat OK code. 78 enableErrorProne = true 79} 80