This repository has been archived by the owner on Jul 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (79 loc) · 3.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
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2"
classpath 'com.palantir:jacoco-coverage:0.4.0'
classpath "com.moowork.gradle:gradle-node-plugin:0.14"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.host.url", "https://sonar.etsag.de"
property "sonar.forceAuthentication", true
//----- Security (when 'sonar.forceAuthentication' is set to 'true')
property "sonar.language", "java"
property "sonar.login", "a50f65ee91c791068a39604a2a71072b4c4e19cd"
property "sonar.projectKey", "com.htwb.android-app:master"
property "sonar.jacoco.reportPath", "build/jacoco/test.exec"
}
}
def getGitVersion() {
ext.revision = 'git rev-list --count HEAD'.execute().text.trim()
println "1.0-r${revision}"
return "1.0-r${revision}"
}
allprojects {
group "de.htwb"
version getGitVersion()
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
tasks.withType(Test) {
include "**/UT*.class"
include "**/IT*.class"
include "**/Test*.class"
include "**/*Test.class"
testLogging {
// set options for log level LIFECYCLE
events "passed", "skipped", "failed", "standardOut"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events "started", "passed", "skipped", "failed", "standardOut", "standardError"
exceptionFormat "full"
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
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
delete "${rootDir}/app/src/main/assets/bundle.js"
}
apply plugin: 'com.palantir.jacoco-full-report'