-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
56 lines (54 loc) · 1.53 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
buildscript {
ext.kotlin_version = '1.7.20'
ext.appcompat_version = '1.4.2'
ext.junit_version = '4.12'
ext.material_version = '1.5.0'
ext.test_param_injector = '1.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'app.cash.paparazzi:paparazzi-gradle-plugin:1.1.0'
}
}
allprojects {
repositories {
google()
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
rootProject.getChildProjects().forEach{ name, project ->
delete project.buildDir
delete "${project.projectDir}/out"
}
}