-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
57 lines (47 loc) · 2.01 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.githubUsername = "$System.env.GITHUB_USERNAME"
ext.githubPassword = "$System.env.GITHUB_PASSWORD"
ext.githubRepo = "$System.env.GITHUB_REPOSITORY"
ext.kotlin_version = '1.6.0'
apply from: "$project.rootDir/gradle/shared.gradle"
dependencies {
classpath "com.android.tools.build:gradle:$GRADLE_PLUGIN_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
apply from: "$project.rootDir/gradle/shared.gradle"
// More verbose logging when running tests
tasks.withType(Test) {
afterTest { desc, result ->
if (result.getResultType() != TestResult.ResultType.SUCCESS) {
def status
switch(result.getResultType()) {
case TestResult.ResultType.SUCCESS: status = "✅"; break
case TestResult.ResultType.SKIPPED: status = "⚠️"; break
default: status = "❌"; break
}
println "$status - ${desc.getClassName()}.${desc.getDisplayName()}()"
}
}
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def totalTime = String.format("%.1f", (result.endTime - result.startTime)/1000.0)
println "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped) in ${totalTime}s"
}
}
}
afterEvaluate { project ->
if (project.hasProperty("android")) {
android {
buildToolsVersion "${project.BUILD_TOOLS_VERSION}"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}