-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
82 lines (66 loc) · 2.17 KB
/
build.gradle.kts
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
val kotlinVersion by extra("1.3.61")
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
kotlin("jvm") version "1.3.61" apply false
idea
id("org.owasp.dependencycheck") version "5.3.0"
id("de.fayard.refreshVersions") version "0.8.6"
id("com.github.spotbugs") version "3.0.0"
}
apply(from = "gradle/owasp.gradle.kts")
subprojects {
apply {
// kotlin("jvm")
plugin("org.jetbrains.kotlin.jvm")
plugin("org.owasp.dependencycheck")
plugin("idea")
plugin("jacoco")
plugin("com.github.spotbugs")
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
withType<AbstractCompile> {
sourceCompatibility = JavaVersion.VERSION_1_10.majorVersion
targetCompatibility = JavaVersion.VERSION_1_10.majorVersion
}
named<DefaultTask>("check") {
dependsOn(dependencyCheckAnalyze)
dependsOn(rootProject.tasks.refreshVersions)
}
// To generate an HTML report instead of XML
withType<com.github.spotbugs.SpotBugsTask> {
reports.xml.isEnabled = false
reports.html.isEnabled = true
}
dependencyCheck {
analyzers(delegateClosureOf<org.owasp.dependencycheck.gradle.extension.AnalyzerExtension> {
assemblyEnabled = false
nugetconfEnabled = false
nuspecEnabled = false
nodeEnabled = false
nodeAuditEnabled = false
swiftEnabled = false
bundleAuditEnabled = false
rubygemsEnabled = false
golangDepEnabled = false
golangModEnabled = false
pyDistributionEnabled = false
pyPackageEnabled = false
})
failBuildOnCVSS = 8F // 10 is the maximum
val skipList: List<String> by project
skipConfigurations = skipList
}
spotbugs {
toolVersion = "4.0.0-beta4"
}
}
}
tasks {
wrapper {
gradleVersion = "6.1.1"
distributionType = Wrapper.DistributionType.ALL
}
}