-
Notifications
You must be signed in to change notification settings - Fork 608
/
Copy pathbuild.gradle
120 lines (116 loc) · 4.35 KB
/
build.gradle
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'kotlin-platform-android'
id 'dagger.hilt.android.plugin'
}
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
applicationId 'com.eltaher.task'
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "com.task.CustomTestRunner"
}
buildFeatures {
viewBinding = true
}
buildTypes {
debug {
debuggable true
}
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "default"
productFlavors {
dev {
dimension = 'default'
applicationIdSuffix = ".dev"
}
prod {
dimension = 'default'
}
}
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
configurations.all {
resolutionStrategy {
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug"
}
}
defaultConfig {
testInstrumentationRunnerArguments clearPackageData: 'true'
}
testOptions {
unitTests.returnDefaultValues = true
}
android {
sourceSets {
String sharedTestDir = 'src/sharedTest/resources'
test {
resources.srcDirs += sharedTestDir
}
androidTest {
resources.srcDirs += sharedTestDir
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "androidx.annotation:annotation:$annotationVersion"
implementation "com.squareup.picasso:picasso:$picassoVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$livedata_ktx"
androidTestImplementation "androidx.test.ext:junit-ktx:$androidXJunitVersion"
/**-------------------testing libs------------------------------------------**/
//UI Testing , AndroidJUnitRunner and JUnit Rules &Espresso dependencies
//junit 5
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
testImplementation "io.mockk:mockk:$mockVersion"
androidTestImplementation "org.assertj:assertj-core:$assertjVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoIntentsVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutinesTestVersion"
implementation "androidx.arch.core:core-testing:$coreTestingVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
implementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
/**-------------------------------------------------------------**/
//android support
implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "com.google.android.material:material:$materialVersion"
// retrofit
implementation "com.squareup.retrofit2:converter-moshi:$retrofitVersion"
implementation "com.squareup.moshi:moshi:$moshiVersion"
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttpInterceptorVersion"
implementation("com.github.bumptech.glide:glide:$glid") {
exclude group: "com.android.support"
}
implementation "androidx.activity:activity-ktx:$activityKtxVersion"
// Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$hilt_viewmodels"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
androidTestImplementation "com.google.dagger:hilt-android-testing:$hilt_version"
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$hilt_version"
}
kapt {
correctErrorTypes true
}