-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbase.gradle
More file actions
106 lines (89 loc) · 4.52 KB
/
base.gradle
File metadata and controls
106 lines (89 loc) · 4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'de.mannodermaus.android-junit5'
apply plugin: 'dagger.hilt.android.plugin'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
minSdkVersion 21
targetSdkVersion 30
// 1) Make sure to use the AndroidJUnitRunner, or a subclass of it. This requires a dependency on androidx.test:runner, too!
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// 2) Connect JUnit 5 to the runner
testInstrumentationRunnerArgument "runnerBuilder", "de.mannodermaus.junit5.AndroidJUnit5Builder"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures.viewBinding = true
buildFeatures.dataBinding = true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
//https://github.com/mannodermaus/android-junit5
// implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.activity:activity-ktx:1.2.2'
implementation 'androidx.fragment:fragment-ktx:1.3.2'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
//log
debugImplementation 'com.github.eastar-dev.EastarLog2:log:2.1.1'
releaseImplementation 'com.github.eastar-dev.EastarLog2:logNoOp:2.1.1'
testImplementation 'com.github.eastar-dev.EastarLog2:logTest:2.1.1'
//ktx
implementation 'com.github.eastar-dev:EastarKtx:1.2.0'
//hilt
implementation 'com.google.dagger:hilt-android:2.33-beta'
kapt 'com.google.dagger:hilt-android-compiler:2.33-beta'
implementation 'androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03'
kapt 'androidx.hilt:hilt-compiler:1.0.0-beta01'
// testImplementation 'com.google.dagger:hilt-android-testing:2.33-beta'
// kaptTest 'com.google.dagger:hilt-android-compiler:2.33-beta'
// androidTestImplementation 'com.google.dagger:hilt-android-testing:2.33-beta'
// kaptAndroidTest 'com.google.dagger:hilt-android-compiler:2.33-beta'
//coroutine test
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3'
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
//common
testImplementation project(':testCommon')
//ViewModel Test
testImplementation 'androidx.arch.core:core-testing:2.1.0'
// Unit5 Tests on the JUnit Platform
testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.1"
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.7.1'
//mockito
// https://www.javadoc.io/static/org.mockito/mockito-core/3.1.0/org/mockito/Mockito.html
testImplementation 'org.mockito:mockito-inline:3.9.0'
//Kotlin의 클래스는 기본이 final입니다. mocktio-inline을 추가해주거나 클래스를 open으로 선언해야 합니다.
// https://beomseok95.tistory.com/296
// testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0" //Mockito-Kotlin
// testImplementation 'org.hamcrest:hamcrest-all:1.3'
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.2'//@RunWith(AndroidJUnit4::class)
//↘androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//↘androidTestImplementation "androidx.test:runner:1.3.0"
//https://bit.ly/junit5-instrumentation-tests
// 4) Jupiter API & Test Runner, if you don't have it already
androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
// 5) The instrumentation test companion libraries
androidTestImplementation "de.mannodermaus.junit5:android-test-core:1.2.2"
androidTestRuntimeOnly "de.mannodermaus.junit5:android-test-runner:1.2.2"
testImplementation project(':testCommon')
}