1- buildscript {
2- repositories {
3- mavenLocal()
4- jcenter()
5- maven {
6- url " https://plugins.gradle.org/m2/"
7- }
8- maven {
9- url artifactoryURL
10- credentials {
11- username = artifactoryUser
12- password = artifactoryPassword
13- }
14- }
15- }
16- dependencies {
17- classpath ' org.ajoberstar:gradle-git:1.4.2'
18- classpath ' net.ltgt.gradle:gradle-errorprone-plugin:0.0.13'
19- }
20-
1+ import net.ltgt.gradle.errorprone.CheckSeverity
2+
3+ plugins {
4+ id ' java'
5+ id ' application'
6+ id ' net.ltgt.errorprone' version ' 0.8.1'
7+ id ' com.github.spotbugs' version ' 2.0.0'
8+ id " com.jfrog.bintray" version ' 1.8.5'
9+ id ' nebula.release' version ' 15.3.1'
2110}
2211
23- apply plugin : ' java '
24- apply plugin : ' application '
25- apply plugin : ' net.ltgt.errorprone '
12+ group = ' com.pega.gcs '
13+ description = " Pega-TracerViewer "
14+
2615apply from : " $rootDir /gradle/artifacts.gradle"
2716apply from : " $rootDir /gradle/jacoco.gradle"
2817apply from : " $rootDir /gradle/pmd.gradle"
2918apply from : " $rootDir /gradle/checkstyle.gradle"
30- apply from : " $rootDir /gradle/findbugs .gradle"
19+ apply from : " $rootDir /gradle/spotbugs .gradle"
3120apply from : " $rootDir /gradle/publishing.gradle"
3221
33- group = ' com.pega.gcs'
34- version = ' 3.2-SNAPSHOT'
35- description = " Pega-TracerViewer"
22+ repositories {
23+ mavenLocal()
24+ maven {
25+ url " https://dl.bintray.com/pegasystems/fringeutils"
26+ }
27+ mavenCentral()
28+ }
3629
37- sourceCompatibility = 1.8
38- targetCompatibility = 1.8
30+ dependencies {
3931
40- mainClassName = " com.pega.gcs.tracerviewer.TracerViewer"
32+ errorprone(" com.google.errorprone:error_prone_core:latest.release" )
33+ errorproneJavac(" com.google.errorprone:javac:latest.release" )
4134
42- tasks. withType(JavaCompile ) {
43- options. encoding = ' UTF-8'
44- }
35+ implementation ' gnu.getopt:java-getopt:1.0.13'
4536
46- repositories {
47- maven { url " https://dl.bintray.com/pegasystems/fringeutils " }
48- maven { url " https://repo.maven.apache.org/maven2 " }
37+ implementation ' com.pega.gcs:fringeutils-common:3.3.0 '
38+
39+ testImplementation ' junit:junit:4.12 '
4940}
5041
51- dependencies {
52- compile group : ' dom4j' , name : ' dom4j' , version :' 1.6.1'
53- compile group : ' gnu.getopt' , name : ' java-getopt' , version :' 1.0.13'
54- compile group : ' commons-io' , name : ' commons-io' , version :' 2.5'
55- compile group : ' org.apache.logging.log4j' , name : ' log4j-core' , version :' 2.8.2'
56- compile group : ' com.pega.gcs' , name : ' fringeutils-common' , version :' 3.1'
57- compileOnly group : ' javax.servlet' , name : ' javax.servlet-api' , version : ' 4.0.0'
58- compile group : ' net.sf.flexjson' , name : ' flexjson' , version : ' 3.3'
59- compile group : ' commons-fileupload' , name : ' commons-fileupload' , version : ' 1.3.3'
60- testCompile " junit:junit:4.12"
61- testCompile (' org.assertj:assertj-core:3.8.0' )
42+ application {
43+ mainClassName = " com.pega.gcs.tracerviewer.TracerViewer"
44+ applicationDefaultJvmArgs = [' XXX_SET_USER_DIR_XXX' , ' -Dfile.encoding=UTF-8' , ' -Xms512M' , ' -Xmx1G' , ' -XX:+UseParNewGC' , ' -XX:+UseConcMarkSweepGC' ]
6245}
6346
6447tasks. withType(JavaCompile ) {
65- // Disabled '-Werror'
66- // ,'-XepAllDisabledChecksAsWarnings'
67- // ,'-Xep:Var:OFF'
48+ options. encoding = ' UTF-8'
6849 options. compilerArgs + = [' -Xlint:-options' ]
50+ options. compilerArgs + = [' -proc:none' ]
6951 sourceCompatibility = ' 1.8'
7052 targetCompatibility = ' 1.8'
53+ // configure error prone
54+ options. errorprone. check(" UnnecessaryParentheses" , CheckSeverity . OFF )
55+ }
56+
57+ tasks. withType(Javadoc ) {
58+ failOnError = false
7159}
7260
7361tasks. withType (Test ) {
7462 maxParallelForks = 2
63+
7564 testLogging {
7665 showStandardStreams = true
7766 events ' started' , ' passed' , ' failed'
7867 }
68+
7969 jacoco {
80- append = false
8170 destinationFile = file(" $buildDir /jacoco/${ name} .exec" )
8271 classDumpDir = file(" $buildDir /jacoco/${ name} _ClassDump" )
8372 }
8473}
8574
86- test {
87- description ' Used for running unit tests.'
88- exclude ' **/**MockTest.class'
89- exclude ' **/**IntegTest.class'
90- }
91-
92- task mockTest (type : Test ) {
93- description ' Used for running mock tests.'
94- include ' **/**MockTest.class'
95- }
96-
97- task integTest (type : Test ) {
98- description ' Used for running integ tests.'
99- include ' **/**IntegTest.class'
75+ task copyLicense (type : Copy ) {
76+ from " LICENSE"
77+ into " $buildDir "
10078}
10179
102- jar {
103- manifest {
104- attributes (
105- ' Main-Class ' : ' com.pega.gcs.tracerviewer.TracerViewer ' ,
106- )
80+ // set user.dir to the distribution directory
81+ startScripts {
82+ doLast {
83+ unixScript . text = unixScript . text . replace( ' XXX_SET_USER_DIR_XXX ' , ' -Duser.dir=$APP_HOME ' )
84+ windowsScript . text = windowsScript . text . replace( ' XXX_SET_USER_DIR_XXX ' , ' -Duser.dir=%APP_HOME% ' )
10785 }
10886}
10987
110- pmd {
111- ignoreFailures = true
112- }
113-
114- findbugs {
115- ignoreFailures = true
116- }
117-
11888build. finalizedBy jacocoTestReport, jacocoTestCoverageVerification
0 commit comments