1/* 2 * Copyright (C) 2020 The Dagger Authors. 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 17apply plugin: 'com.android.application' 18 19android { 20 compileSdkVersion 30 21 buildToolsVersion "30.0.2" 22 23 defaultConfig { 24 applicationId "dagger.android.simple" 25 minSdkVersion 15 26 targetSdkVersion 30 27 versionCode 1 28 versionName "1.0" 29 } 30 compileOptions { 31 sourceCompatibility 1.8 32 targetCompatibility 1.8 33 } 34 testOptions { 35 unitTests.includeAndroidResources = true 36 } 37 sourceSets { 38 String sharedTestDir = 'src/sharedTest/java' 39 test { 40 java.srcDirs += sharedTestDir 41 } 42 androidTest { 43 java.srcDirs += sharedTestDir 44 } 45 } 46} 47 48dependencies { 49 implementation 'androidx.appcompat:appcompat:1.2.0' 50 implementation 'com.google.dagger:dagger:LOCAL-SNAPSHOT' 51 implementation 'com.google.dagger:dagger-android-support:LOCAL-SNAPSHOT' 52 annotationProcessor 'com.google.dagger:dagger-compiler:LOCAL-SNAPSHOT' 53 annotationProcessor 'com.google.dagger:dagger-android-processor:LOCAL-SNAPSHOT' 54 55 testImplementation 'com.google.truth:truth:1.0.1' 56 testImplementation 'org.robolectric:robolectric:4.5-alpha-3' 57 testImplementation 'androidx.core:core:1.3.2' 58 testImplementation 'androidx.test.ext:junit:1.1.2' 59 testImplementation 'androidx.test:runner:1.3.0' 60 testImplementation 'androidx.test.espresso:espresso-core:3.3.0' 61 testImplementation 'com.google.dagger:dagger-compiler:LOCAL-SNAPSHOT' 62 testAnnotationProcessor 'com.google.dagger:dagger-android-processor:LOCAL-SNAPSHOT' 63 64 androidTestImplementation 'com.google.truth:truth:1.0.1' 65 androidTestImplementation 'androidx.test.ext:junit:1.1.2' 66 androidTestImplementation 'androidx.test:runner:1.3.0' 67 androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' 68 androidTestImplementation 'com.google.dagger:dagger-compiler:LOCAL-SNAPSHOT' 69 androidTestAnnotationProcessor 'com.google.dagger:dagger-android-processor:LOCAL-SNAPSHOT' 70 71 // To help us catch usages of Guava APIs for Java 8 in the '-jre' variant. 72 annotationProcessor'com.google.guava:guava:28.1-android' 73 testAnnotationProcessor'com.google.guava:guava:28.1-android' 74 androidTestAnnotationProcessor'com.google.guava:guava:28.1-android' 75} 76