-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
96 lines (87 loc) · 3.76 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.71'
ext.plugin_version = '3.1.4'
ext.playservices_version = '15.0.1'
ext.firebase_version = '15.0.2'
ext.support_libs_version = '27.1.1'
ext.ktor_version = '0.9.1'
def toggler = new Properties()
def togglerPropperties = file("feature_toggle.properties")
if (togglerPropperties.exists())
toggler.load(new FileReader(togglerPropperties))
ext.toggler = toggler
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath "com.android.tools.build:gradle:$plugin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-noarg:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.0'
classpath 'io.fabric.tools:gradle:1.26.1'
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://dl.bintray.com/kotlin/ktor" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
}
}
subprojects { project ->
afterEvaluate {
if (project.plugins.hasPlugin("java")) {
project.apply from: "${project.rootDir}/gradle/jacoco.gradle"
project.apply from: "${project.rootDir}/gradle/checkstyle.gradle"
}
if (project.plugins.hasPlugin("kotlin") || project.plugins.hasPlugin("kotlin-android")) {
project.apply from: "${project.rootDir}/gradle/ktlint.gradle"
}
// Thanks to Shubham Chaudhary, for mor info: https://stackoverflow.com/a/36130467/1622925
project.tasks.withType(Test) {
failFast = true
ignoreFailures= false
maxParallelForks = Integer.parseInt(project.properties.get("parallelForks", "1"))
testLogging {
events TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
debug {
events TestLogEvent.FAILED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT,
TestLogEvent.STANDARD_ERROR
exceptionFormat TestExceptionFormat.FULL
}
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply from: rootProject.file("gradle/sites.gradle")