forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
119 lines (110 loc) · 3.6 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
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}
testOptions {
unitTests {
includeAndroidResources = true
all {
// Enable forking to ensure each test is properly run in isolation. For context, see:
// https://discuss.gradle.org/t/36066/2 & https://github.com/oppia/oppia-android/issues/1942
forkEvery = 1
maxParallelForks = Runtime.getRuntime().availableProcessors()
// https://discuss.gradle.org/t/29495/2 & https://stackoverflow.com/a/34299238.
testLogging {
events "passed", "skipped", "failed"
showExceptions = true
exceptionFormat = "full"
showCauses = true
showStackTraces = true
showStandardStreams = false
}
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(
'androidx.appcompat:appcompat:1.0.2',
'com.android.support:multidex:1.0.3',
'com.google.dagger:dagger:2.24',
'com.google.guava:guava:28.1-android',
'com.google.protobuf:protobuf-javalite:3.17.3',
'com.squareup.moshi:moshi-kotlin:1.11.0',
'com.squareup.okhttp3:okhttp:4.1.0',
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.2.2',
)
compileOnly(
'jakarta.xml.bind:jakarta.xml.bind-api:2.3.2',
'javax.annotation:javax.annotation-api:1.3.2',
'org.glassfish.jaxb:jaxb-runtime:2.3.2',
)
testImplementation(
'android.arch.core:core-testing:1.1.1',
'androidx.test.ext:junit:1.1.1',
'com.google.dagger:dagger:2.24',
'com.google.truth:truth:1.1.3',
'com.squareup.okhttp3:mockwebserver:4.1.0',
'com.squareup.okhttp3:okhttp:4.1.0',
'junit:junit:4.12',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.mockito:mockito-core:2.19.0',
'org.robolectric:robolectric:4.4',
project(":testing"),
)
// TODO(#59): Remove this once Bazel is introduced
// TODO(#97): Isolate retrofit-mock dependency from production
api(
'com.squareup.retrofit2:converter-moshi:2.5.0',
'com.squareup.retrofit2:retrofit:2.5.0',
'com.squareup.retrofit2:retrofit-mock:2.5.0',
)
androidTestImplementation('androidx.test:runner:1.2.0',
'androidx.test.espresso:espresso-core:3.2.0')
kapt(
'com.google.dagger:dagger-compiler:2.24',
'com.squareup.moshi:moshi-kotlin-codegen:1.11.0'
)
kaptTest(
'com.google.dagger:dagger-compiler:2.24'
)
implementation project(":utility")
implementation project(":model")
testImplementation project(":model")
}
// The GeneratedMessageLite implementations of protobufs are depending on protobuf-java
// instead of protobuf-lite after Android Studio 3.5,
// The below command stops that from happening: https://github.com/google/tink/issues/282
configurations {
all*.exclude module: 'protobuf-java'
}