-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
118 lines (92 loc) · 3.05 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
plugins {
id 'me.champeau.jmh' version '0.7.2' apply false
id 'com.github.ben-manes.versions' version '0.51.0' apply false
id 'org.owasp.dependencycheck' version '10.0.4' apply false
id "com.github.spotbugs" version "6.0.23" apply false
id 'io.morethan.jmhreport' version '0.9.6' apply false
}
ext {
javaJwtVersion = '4.4.0'
jwksRsaVersion = '0.22.1'
jjwtVersion = '0.12.6'
nimbusVersion = '9.46'
jmhVersion = '1.37'
oktaVersion = '0.5.10'
fusionAuthVersion = '5.3.3'
junitJupiterVersion = '5.11.3'
jaxbVersion = '2.3.1'
bouncyCastleVersion = '1.79'
jose4jVersion = '0.9.6'
}
def buildProjects() {
subprojects.findAll { new File(it.projectDir, 'build.gradle').file }
}
def libraryProjects() {
buildProjects().findAll { !it.name.equals("jmh-benchmark") }
}
configure(libraryProjects()) {
apply plugin: 'java-library'
test {
useJUnitPlatform {
}
forkEvery = 1
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
}
}
configure(buildProjects()) {
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'org.owasp.dependencycheck'
apply plugin: 'com.github.spotbugs'
repositories {
mavenLocal()
mavenCentral()
}
tasks.matching { task -> task.name.startsWith('spotbugs') }.forEach {
it.reports {
html.enabled = true
xml.enabled = false
// spotbugs does not allow to generate a xml and html report at once https://github.com/spotbugs/spotbugs/issues/857
}
it.excludeFilter = file("$rootDir/spotbugs-exclude.xml")
}
}
configure(project(':jmh-benchmark')) {
apply plugin: 'java'
apply plugin: 'io.morethan.jmhreport'
apply plugin: 'me.champeau.jmh'
jmh {
jvmArgs = ["--add-opens", "java.management/sun.management=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED"]
resultFormat = 'JSON'
warmup = '1s' // Time to spend at each warmup iteration.
warmupIterations = 10
// includes = ['JwtVerifyBenchmark']
fork = 1
timeOnIteration = '5s'
iterations = 5
benchmarkMode = ['thrpt']
//jvmArgs = ['-XX:+UseG1GC', '-XX:+UnlockDiagnosticVMOptions', '-XX:+UseMontgomerySquareIntrinsic', '-XX:+UseMontgomeryMultiplyIntrinsic', '-XX:+UseSquareToLenIntrinsic', '-XX:+UseMultiplyToLenIntrinsic']
jvmArgs = ['-XX:+UseG1GC']
duplicateClassesStrategy = DuplicatesStrategy.WARN
}
jmhReport {
jmhResultPath = project.file("build/results/jmh/results.json")
jmhReportOutput = project.file("build/results/jmh")
}
jmhJar {
exclude 'LICENSE'
}
tasks.jmh.finalizedBy tasks.jmhReport
}
configure(buildProjects()) {
apply plugin: 'eclipse'
apply plugin: 'idea'
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
}
}
}