-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (64 loc) · 1.9 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.owasp:dependency-check-gradle:6.5.0.1'
}
}
plugins {
id 'jacoco'
id "org.sonarqube" version "3.3"
}
apply plugin: 'org.owasp.dependencycheck'
apply plugin: 'java-library'
repositories {
mavenCentral()
}
dependencies {
implementation 'ch.qos.logback:logback-classic:1.2.10'
implementation 'ch.qos.logback:logback-core:1.2.10'
implementation 'joda-time:joda-time:2.10.13'
implementation 'org.slf4j:slf4j-api:1.7.35'
testImplementation 'junit:junit:4.13.2'
}
sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.projectKey", "sonarqube-pr-dep"
property "sonar.projectName", "sonarqube-pr-dep"
property "sonar.scm.provider", "git"
property 'sonar.dependencyCheck.reportPath', 'build/reports/dependency-check-report.xml'
property 'sonar.dependencyCheck.xmlReportPath', 'build/reports/dependency-check-report.xml'
property 'sonar.dependencyCheck.htmlReportPath', 'build/reports/dependency-check-report.html'
property 'sonar.qualitygate.wait', 'true'
property 'sonar.coverage.jacoco.xmlReportPaths', '${project.buildDir}/reports/jacoco.xml'
properties['sonar.sources'] += "build.gradle"
property 'sonar.login', System.properties['sonarconfig.login']
}
}
jacocoTestReport {
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
dependsOn test
reports {
html.required = false
xml.required = true
}
}
dependencyCheck {
failBuildOnCVSS = 11
dependencyCheck {
format = 'ALL'
}
analyzers {
nodeAudit {
skipDevDependencies = true
}
nodeEnabled = false
retirejs {
enabled = false
}
assemblyEnabled = false
}
failOnError = true
}