-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
141 lines (124 loc) · 4.69 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
plugins {
id 'java-library'
id 'jacoco'
id 'signing'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version '2.0.0'
id 'org.sonarqube' version '5.1.0.4882'
id 'me.champeau.gradle.jmh' version '0.5.3'
}
group 'com.apptasticsoftware'
version "${version}"
repositories {
mavenCentral()
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.11.0")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation('org.mockito:mockito-core:5.12.0')
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
ext.moduleName = 'com.apptasticsoftware.insynsregistret'
compileJava {
options.encoding = "UTF-8"
inputs.property('moduleName', moduleName)
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath
]
classpath = files()
}
}
jacoco {
toolVersion = "0.8.9"
}
jacocoTestReport {
reports {
xml.required = true
xml.outputLocation = file("${buildDir}/reports/jacoco/report.xml")
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
connectTimeout = Duration.ofMinutes(3)
clientTimeout = Duration.ofMinutes(3)
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'Insynsregistret'
description = 'Java library for extracting data from the Financial Supervisory Authority (Finansinspektionen) insider registry.'
url = 'https://github.com/w3stling/insynsregistret'
licenses {
license {
name = 'MIT License'
url = 'https://raw.githubusercontent.com/w3stling/insynsregistret/master/LICENSE'
}
}
developers {
developer {
id = 'w3stling'
name = 'Apptastic Software'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/w3stling/insynsregistret'
connection = 'scm:git://github.com/w3stling/insynsregistret.git'
developerConnection = 'scm:git:ssh://github.com/w3stling/insynsregistret.git'
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
jmh {
include = ['.*InsynsregistretBenchmark*']
humanOutputFile = project.file("${project.buildDir}/reports/jmh/human.txt")
resultsFile = project.file("${project.buildDir}/reports/jmh/results.csv")
//benchmarkMode = 'thrpt'//'thrpt' // Benchmark mode. Available modes are: [Throughput/thrpt, AverageTime/avgt, SampleTime/sample, SingleShotTime/ss, All/all]
forceGC = true // Should JMH force GC between iterations?
//profilers = ['COMP', 'STACK'] //['COMP','GC', 'STACK','CL'] // Use profilers
timeUnit = 's' // Output time unit. Available time units are: [m, s, ms, us, ns].
verbosity = 'NORMAL' // Verbosity mode. Available modes are: [SILENT, NORMAL, EXTRA]
timeOnIteration = '5s' // Time to spend at each measurement iteration.
batchSize = 1 // Batch size: number of benchmark method calls per operation. (some benchmark modes can ignore this setting)
fork = 5 // How many times to forks a single benchmark. Use 0 to disable forking altogether
iterations = 1 // Number of measurement iterations to do.
threads = 1 // Number of worker threads to run with.
warmup = '3s' // Time to spend at each warmup iteration.
warmupBatchSize = 1 // Warmup batch size: number of benchmark method calls per operation.
warmupForks = 1 // How many warmup forks to make for a single benchmark. 0 to disable warmup forks.
warmupIterations = 1 // Number of warmup iterations to do.
warmupMode = 'INDI' // Warmup mode for warming up selected benchmarks. Warmup modes are: [INDI, BULK, BULK_INDI].
}
sonar {
properties {
property "sonar.projectKey", "w3stling_insynsregistret"
property "sonar.organization", "w3stling"
property "sonar.host.url", "https://sonarcloud.io"
}
}