• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    namespace "dagger.android.ksp"
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
52kotlin {
53    jvmToolchain(17)
54}
55
56dependencies {
57    implementation 'androidx.appcompat:appcompat:1.2.0'
58    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
59
60    testImplementation 'com.google.truth:truth:1.0.1'
61    testImplementation 'org.robolectric:robolectric:4.11.1'
62    testImplementation 'androidx.core:core:1.3.2'
63    testImplementation 'androidx.test.ext:junit:1.1.5'
64    testImplementation 'androidx.test:runner:1.5.2'
65    testImplementation 'androidx.test.espresso:espresso-core:3.5.1'
66
67    androidTestImplementation 'com.google.truth:truth:1.0.1'
68    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
69    androidTestImplementation 'androidx.test:runner:1.5.2'
70    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
71
72    // Dagger Android dependencies
73    implementation 'com.google.dagger:dagger:LOCAL-SNAPSHOT'
74    implementation 'com.google.dagger:dagger-android-support:LOCAL-SNAPSHOT'
75    implementation 'com.google.dagger:dagger-android:LOCAL-SNAPSHOT'
76    ksp 'com.google.dagger:dagger-android-processor:LOCAL-SNAPSHOT'
77    ksp "com.google.dagger:dagger-compiler:LOCAL-SNAPSHOT"
78}