forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
101 lines (94 loc) · 3.12 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
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"
}
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
}
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(
'androidx.annotation:annotation:1.1.0',
'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03',
'androidx.core:core-ktx:1.0.2',
"androidx.test:core:1.0.0",
'androidx.test.espresso:espresso-core:3.2.0',
'androidx.test:runner:1.2.0',
'com.google.dagger:dagger:2.24',
'com.google.truth:truth:0.43',
'nl.dionsegijn:konfetti:1.2.5',
'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.2.2',
'org.robolectric:robolectric:4.4',
'org.jetbrains.kotlin:kotlin-reflect:$kotlin_version',
'org.mockito:mockito-core:2.19.0',
project(":domain"),
project(":utility"),
)
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(
'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0-alpha03',
'androidx.test.ext:junit:1.1.1',
'com.google.truth:truth:0.43',
'junit:junit:4.12',
"org.jetbrains.kotlin:kotlin-reflect:$kotlin_version",
'org.mockito:mockito-core:2.19.0',
project(":domain"),
)
kapt(
'com.google.dagger:dagger-compiler:2.24',
)
kaptTest(
'com.google.dagger:dagger-compiler:2.24',
)
annotationProcessor(
'com.google.auto.service:auto-service:1.0-rc4',
)
// TODO (#59): Remove this once Bazel is introduced
// sufficiently visible for generated Dagger code. This can be done more cleanly via Bazel since dependencies can be
// controlled more directly than in Gradle.
implementation 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'
}