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'
18apply plugin: 'kotlin-android'
19apply plugin: 'kotlin-kapt'
20apply plugin: 'dagger.hilt.android.plugin'
21
22android {
23    compileSdkVersion 30
24    buildToolsVersion "30.0.2"
25
26    defaultConfig {
27        applicationId "dagger.hilt.android.gradleConfigCache"
28        minSdkVersion 15
29        targetSdkVersion 30
30        versionCode 1
31        versionName "1.0"
32        testInstrumentationRunner "dagger.hilt.android.gradleConfigCache.TestRunner"
33    }
34    compileOptions {
35        sourceCompatibility 1.8
36        targetCompatibility 1.8
37    }
38    kotlinOptions {
39        jvmTarget = '1.8'
40    }
41    testOptions {
42        unitTests.includeAndroidResources = true
43    }
44}
45
46hilt {
47    enableTransformForLocalTests = true
48}
49
50dependencies {
51    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
52    implementation 'androidx.appcompat:appcompat:1.2.0'
53    implementation 'androidx.activity:activity-ktx:1.1.0'
54    implementation 'androidx.multidex:multidex:2.0.0'
55    implementation 'com.google.dagger:hilt-android:LOCAL-SNAPSHOT'
56    kapt 'com.google.dagger:hilt-compiler:LOCAL-SNAPSHOT'
57
58    testImplementation 'junit:junit:4.13'
59    testImplementation 'androidx.test.ext:junit:1.1.2'
60    testImplementation 'androidx.test:runner:1.3.0'
61    testImplementation 'org.robolectric:robolectric:4.5-alpha-3'
62    testImplementation 'com.google.dagger:hilt-android-testing:LOCAL-SNAPSHOT'
63    kaptTest 'com.google.dagger:hilt-compiler:LOCAL-SNAPSHOT'
64
65    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
66    androidTestImplementation 'androidx.test:runner:1.3.0'
67    androidTestImplementation 'com.google.dagger:hilt-android-testing:LOCAL-SNAPSHOT'
68    kaptAndroidTest 'com.google.dagger:hilt-compiler:LOCAL-SNAPSHOT'
69}
70