-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
117 lines (94 loc) · 3.44 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
import net.ltgt.gradle.errorprone.CheckSeverity
plugins {
id 'java'
id 'application'
id 'net.ltgt.errorprone' version '3.1.0'
id 'com.github.spotbugs' version '5.1.2'
id 'nebula.release' version '17.2.2'
}
group = 'com.pega.gcs'
description = "Pega-LogViewer"
apply from: "$rootDir/gradle/artifacts.gradle"
apply from: "$rootDir/gradle/jacoco.gradle"
apply from: "$rootDir/gradle/pmd.gradle"
apply from: "$rootDir/gradle/checkstyle.gradle"
apply from: "$rootDir/gradle/spotbugs.gradle"
apply from: "$rootDir/gradle/publishing.gradle"
repositories {
mavenLocal()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
errorprone("com.google.errorprone:error_prone_core:2.21.1")
implementation 'gnu.getopt:java-getopt:1.0.13'
implementation 'org.jfree:jfreechart:1.5.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.15.2'
implementation 'com.fasterxml.woodstox:woodstox-core:6.5.1'
implementation 'org.codehaus.woodstox:stax2-api:4.2.1'
implementation 'org.apache.poi:poi-ooxml:5.2.3'
// Java 11 changes
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0'
implementation 'com.sun.xml.bind:jaxb-impl:4.0.3'
implementation 'com.github.pegasystems:fringeutils-common:v3.4.6'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
application {
mainClassName = 'com.pega.gcs.logviewer.LogViewer'
applicationDefaultJvmArgs = [
'-Duser.dir=XXX_SET_USER_DIR_XXX',
'-Dfile.encoding=UTF-8',
'-Xms1G',
'-Xmx4G',
'-XX:+UseG1GC',
'-XX:+UseStringDeduplication'
]
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:-options']
options.compilerArgs += ['-proc:none']
// configure error prone
options.errorprone.check("UnnecessaryParentheses", CheckSeverity.OFF)
}
tasks.withType(Javadoc) {
failOnError = false
}
tasks.withType (Test) {
maxParallelForks = 2
testLogging {
showStandardStreams = true
events 'started', 'passed', 'failed'
}
jacoco {
destinationFile = file("$buildDir/jacoco/${name}.exec")
classDumpDir = file("$buildDir/jacoco/${name}_ClassDump")
}
}
task copyLicense(type: Copy) {
from "LICENSE"
into "$buildDir"
}
// set user.dir to the distribution directory
startScripts {
doLast {
unixScript.text = unixScript.text.replace('XXX_SET_USER_DIR_XXX', "'\$APP_HOME'")
windowsScript.text = windowsScript.text.replace('XXX_SET_USER_DIR_XXX', '%APP_HOME%')
}
}
task copyPluginsDir(type: Copy) {
if (project.hasProperty("buildGCS") ? Boolean.valueOf(buildGCS.trim()) : false ) {
from "/src/main/resources/plugins"
into "$buildDir/plugins"
includeEmptyDirs = true
}
}
applicationDistribution.from(copyPluginsDir) {
into ('plugins')
}
build.finalizedBy jacocoTestReport, jacocoTestCoverageVerification