-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
99 lines (86 loc) · 3.19 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
import static org.gradle.api.tasks.testing.logging.TestLogEvent.*
plugins {
id "java-library"
id "io.freefair.lombok" version "5.3.0"
}
gradle.startParameter.showStacktrace = ShowStacktrace.ALWAYS_FULL
version = "1.5.${Instant.now().epochSecond.toString()}+${gitHash}"
group = 'com.tesco.crypt'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
println "\n\n\n\n============================================================================="
println "== CREATING ARTIFACT: ${group}:${name}:${version} =="
println "=============================================================================\n\n\n\n"
repositories {
mavenCentral()
jcenter()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
}
def log4j2Version = "2.13.1"
def junitVersion = "5.6.0"
dependencies {
// apache commons
implementation "commons-io:commons-io:2.7"
implementation "org.apache.commons:commons-lang3:3.10"
implementation "commons-codec:commons-codec:1.14"
// logging
implementation "org.apache.logging.log4j:log4j-api:${log4j2Version}"
implementation "org.apache.logging.log4j:log4j-core:${log4j2Version}"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4j2Version}"
implementation "org.apache.logging.log4j:log4j-jul:${log4j2Version}"
implementation "org.apache.logging.log4j:log4j-jcl:${log4j2Version}"
implementation "com.lmax:disruptor:3.4.2"
// jackson for debugging
implementation "com.fasterxml.jackson.core:jackson-databind:2.11.0"
// unit testing
testImplementation "org.hamcrest:hamcrest:2.+"
testImplementation "org.mockito:mockito-core:3.6.+"
testImplementation "org.mock-server:mockserver-netty:5.11.0"
testCompile "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
testCompile "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testCompile "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
}
compileJava {
options.compilerArgs += [
'-Xlint:unchecked',
'-Xlint:deprecation',
'-Xlint:-requires-transitive-automatic',
'-Werror',
'--add-exports', "java.base/sun.security.x509=ALL-UNNAMED",
]
}
compileTestJava {
options.compilerArgs += [
'-Xlint:unchecked',
'-Xlint:deprecation',
'-Xlint:-requires-transitive-automatic',
'-Werror',
'--add-exports', "java.base/sun.security.x509=ALL-UNNAMED",
]
}
test {
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
systemProperties['junit.jupiter.execution.parallel.enabled'] = true
useJUnitPlatform {
includeTags 'UnitTest'
failFast = false
}
reports {
junitXml.enabled = true
html.enabled = true
}
testLogging {
events STARTED, PASSED, SKIPPED, FAILED, STANDARD_OUT, STANDARD_ERROR
showStandardStreams = true
exceptionFormat = 'full'
}
doFirst() {
systemProperty "java.security.egd", "file:/dev/urandom"
environment "PRETTY_PRINT_LOG", "true"
environment "LOG_LEVEL_CRYPT", "debug"
environment "LOG_LEVEL_ROOT", "warn"
}
}
java {
withSourcesJar()
}