-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (79 loc) · 2.49 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
97
98
99
100
plugins {
id 'java'
id 'jacoco'
id 'checkstyle'
id 'pmd'
id "com.github.spotbugs" version "4.6.0"
id 'de.aaschmid.cpd' version '3.1'
id "org.sonarqube" version "3.0"
}
subprojects {
apply from: file("$rootProject.projectDir/gradle/heroku/stage.gradle")
apply plugin: 'org.sonarqube'
}
allprojects {
ext.baseVersion = "0.1"
ext.snapshotVersion = true
group = "org.sonarqube"
version = "$baseVersion" + (snapshotVersion ? "-SNAPSHOT" : "")
}
task('root-task').doLast {
println "I'm $project.name"
}
println "This is executed during the $project.name configuration phase."
group = 'com.qualitychecks'
sourceCompatibility = '11'
repositories {
mavenCentral()
jcenter()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testImplementation 'org.hamcrest:hamcrest-core:2.2'
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
}
resources.srcDir 'integrationTest/resources'
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
}
test {
useJUnitPlatform()
}
task integrationTest(type: Test) {
description = 'Runs integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
useJUnitPlatform()
outputs.upToDateWhen { false }
mustRunAfter test
}
check.dependsOn integrationTest
apply from: 'gradle/checkstyle.gradle'
apply from: 'gradle/jacoco.gradle'
apply from: 'gradle/pmd.gradle'
apply from: 'gradle/spotbugs.gradle'
integrationTest.dependsOn test
jacocoTestCoverageVerification.dependsOn jacocoTestReport
check.dependsOn(cpdCheck, pmdMain, jacocoTestCoverageVerification, integrationTest)
sonarqube {
properties {
property "sonar.projectName", "CSAAT"
property "sonar.projectKey", "THISURA97_CSAAT"
property "sonar.organization", "thisura97"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.coverage.jacoco.xmlReportPaths", "./build/reports/jacocoReport.xml"
property "sonar.junit.reportsPath", "app/build/test-results/*/TEST-*.xml"
}
}