1/* 2 * Copyright (C) 2023 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 17plugins { 18 id 'com.android.application' 19 id 'org.jetbrains.kotlin.android' 20 id 'com.google.devtools.ksp' 21} 22 23android { 24 namespace 'dagger.android.ksp' 25 compileSdkVersion 33 26 defaultConfig { 27 applicationId 'dagger.android.ksp' 28 minSdk 16 29 targetSdk 33 30 versionCode 1 31 versionName "1.0" 32 } 33 34 compileOptions { 35 sourceCompatibility JavaVersion.VERSION_17 36 targetCompatibility JavaVersion.VERSION_17 37 } 38 testOptions { 39 unitTests.includeAndroidResources = true 40 } 41 sourceSets { 42 String sharedTestDir = 'src/sharedTest/java' 43 test { 44 java.srcDirs += sharedTestDir 45 } 46 androidTest { 47 java.srcDirs += sharedTestDir 48 } 49 } 50} 51 52dependencies { 53 implementation 'androidx.appcompat:appcompat:1.2.0' 54 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" 55 56 testImplementation 'com.google.truth:truth:1.0.1' 57 testImplementation 'org.robolectric:robolectric:4.11.1' 58 testImplementation 'androidx.core:core:1.3.2' 59 testImplementation 'androidx.test.ext:junit:1.1.5' 60 testImplementation 'androidx.test:runner:1.5.2' 61 testImplementation 'androidx.test.espresso:espresso-core:3.5.1' 62 63 androidTestImplementation 'com.google.truth:truth:1.0.1' 64 androidTestImplementation 'androidx.test.ext:junit:1.1.5' 65 androidTestImplementation 'androidx.test:runner:1.5.2' 66 androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 67 68 // Dagger Android dependencies 69 implementation 'com.google.dagger:dagger:LOCAL-SNAPSHOT' 70 implementation 'com.google.dagger:dagger-android-support:LOCAL-SNAPSHOT' 71 implementation 'com.google.dagger:dagger-android:LOCAL-SNAPSHOT' 72 ksp 'com.google.dagger:dagger-android-processor:LOCAL-SNAPSHOT' 73 ksp "com.google.dagger:dagger-compiler:LOCAL-SNAPSHOT" 74}