-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
50 lines (47 loc) · 1.59 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
buildscript {
ext.kotlin_version = "1.4.20"
ext.robolectric_version = "4.3.1"
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
afterEvaluate {
if (extensions.findByName("android") != null) {
android {
testOptions {
unitTests {
includeAndroidResources = true
all {
afterTest { TestDescriptor test, TestResult result ->
if (result.resultType == TestResult.ResultType.FAILURE) {
def message = result.exception?.message ?: "Wrong answer"
def lines = message.readLines()
println "#educational_plugin FAILED + " + lines[0]
lines.subList(1, lines.size()).forEach { line ->
println "#educational_plugin" + line
}
// we need this to separate output of different tests
println()
}
}
}
}
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}