This repository has been archived by the owner on May 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
78 lines (64 loc) · 2.51 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
// bug in IntelliJ in which libs shows up as not being accessible
// see https://youtrack.jetbrains.com/issue/KTIJ-19369
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
base
`java-library`
alias(libs.plugins.owaspDepCheckPlugin)
}
subprojects {
// See buildSrc/src/main/kotlin/cdm.java-conventions.gradle.kts and
// buildSrc/src/main/kotlin/cdm.library-conventions.gradle.kts for
// more details on how cdm projects are built.
project.version = "0.9.5-SNAPSHOT"
project.group = "com.sunya.electionguard"
}
tasks.wrapper {
gradleVersion = "7.3.3"
distributionSha256Sum = "c9490e938b221daf0094982288e4038deed954a3f12fb54cbf270ddf4e37d879"
distributionType = Wrapper.DistributionType.ALL
}
dependencyCheck {
analyzers.retirejs.enabled = false
analyzers.assemblyEnabled = false
data.setDirectory("$rootDir/project-files/owasp-dependency-check/nvd")
scanConfigurations = listOf("compileClasspath", "runtimeClasspath")
suppressionFile = "$rootDir/project-files/owasp-dependency-check/dependency-check-suppression.xml"
// fail the build if any vulnerable dependencies are identified (any CVSS score > 0).
failBuildOnCVSS = 0F
}
description = "electionguard-java"
// handle proto generated source and class files
sourceSets {
main {
java {
srcDir("build/generated/source/proto/main/java")
srcDir("build/generated/source/proto/main/grpc")
}
}
}
tasks.test {
useJUnitPlatform {
includeEngines("jqwik")
// Or include several Junit engines if you use them
// includeEngines "jqwik", "junit-jupiter", "junit-vintage"
// includeTags "fast", "medium"
// excludeTags "slow"
}
include("**/*Properties.class")
include("**/*Test.class")
include("**/*Tests.class")
include("**/Test*.class")
}
tasks.withType<Javadoc> {
group = "documentation"
options.encoding = "UTF-8"
(options as StandardJavadocDocletOptions).docEncoding = "UTF-8"
(options as StandardJavadocDocletOptions).charSet("UTF-8")
// When instances of JDK classes appear in our Javadoc (e.g. "java.lang.String"), create links out of them to
// Oracle"s JavaSE 11 Javadoc.
(options as StandardJavadocDocletOptions).links("https://docs.oracle.com/en/java/javase/11/docs/api/")
// doclint="all" (the default) will identify 100s of errors in our docs and cause no Javadoc to be generated.
// So, turn it off.
(options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet")
}