1- buildscript {
2- repositories {
3- mavenCentral()
4- }
5- dependencies {
6- classpath ' org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.0'
7- }
8- }
9-
101plugins {
11- id ' com.adarshr.test-logger' version ' 1.1.2 '
12- id ' com.github.johnrengelman.shadow' version ' 5 .1.0 '
13- id ' org.ajoberstar.grgit' version ' 2 .2.1'
14- id ' org.sonarqube' version ' 3.0 '
2+ id ' com.adarshr.test-logger' version ' 4.0.0 '
3+ id ' com.github.johnrengelman.shadow' version ' 8 .1.1 '
4+ id ' org.ajoberstar.grgit' version ' 5 .2.1'
5+ id ' org.sonarqube' version ' 4.4.1.3373 '
156}
167
178apply plugin : ' java'
@@ -36,21 +27,43 @@ version "${version}"
3627
3728mainClassName = " uk.dvsa.mot.PdfGenerator"
3829
39- sourceCompatibility = 11
30+ java {
31+ toolchain {
32+ languageVersion = JavaLanguageVersion . of(21 )
33+ }
34+ }
35+
36+ jacoco {
37+ toolVersion = " 0.8.11"
38+ }
4039
4140jacocoTestReport {
4241 group = " Reporting"
4342 reports {
44- xml. enabled true
45- csv. enabled false
46- html. destination file(" ${ buildDir} /reports/coverage" )
43+ xml. required = true
44+ csv. required = false
45+ html. outputLocation = file(" ${ buildDir} /reports/coverage" )
4746 // html.destination file("./reports/coverage")
4847 }
4948}
5049
5150
5251testlogger {
5352 theme ' mocha'
53+ showExceptions true
54+ showStackTraces true
55+ showFullStackTraces false
56+ showCauses true
57+ slowThreshold 2000
58+ showSummary true
59+ showSimpleNames false
60+ showPassed true
61+ showSkipped true
62+ showFailed true
63+ showStandardStreams false
64+ showPassedStandardStreams false
65+ showSkippedStandardStreams false
66+ showFailedStandardStreams true
5467}
5568
5669idea {
@@ -65,28 +78,28 @@ repositories {
6578}
6679
6780dependencies {
68- compile group : ' com.amazonaws' , name : ' aws-lambda-java-core' , version : ' 1.1.0'
69- compile group : " com.github.jknack" , name : " handlebars" , version : " 4.2 .0"
70- compile group : ' org.xhtmlrenderer' , name : ' flying-saucer-pdf-openpdf' , version : ' 9.1.20'
71- compile group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : ' 2.15.0'
72- compile group : ' com.fasterxml.jackson.datatype' , name : ' jackson-datatype-jsr310' , version : ' 2.15.0'
73- compile group : ' com.amazonaws' , name : ' aws-lambda-java-log4j2' , version : ' 1.5.1'
74- compile group : ' org.apache.logging.log4j' , name : ' log4j-core' , version : ' 2.22.1'
75- compile group : ' org.apache.logging.log4j' , name : ' log4j-api' , version : ' 2.22.1'
76- compile group : ' org.apache.logging.log4j' , name : ' log4j-slf4j-impl' , version : ' 2.22.1'
77- compile group : ' org.apache.commons' , name : ' commons-lang3' , version : ' 3.4'
78- compile fileTree(dir : ' jars' , include : ' *.jar' )
79- testCompile group : ' junit' , name : ' junit' , version : ' 4.13.1'
80- testCompile group : ' org.jsoup' , name : ' jsoup' , version : ' 1.15.3'
81- testCompile group : ' commons-io' , name : ' commons-io' , version : ' 2.14.0'
82- testCompile group : ' com.itextpdf' , name : ' itextpdf' , version : ' 5.5.12'
81+ implementation group : ' com.amazonaws' , name : ' aws-lambda-java-core' , version : ' 1.1.0'
82+ implementation group : " com.github.jknack" , name : " handlebars" , version : " 4.5 .0"
83+ implementation group : ' org.xhtmlrenderer' , name : ' flying-saucer-pdf-openpdf' , version : ' 9.1.20'
84+ implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : ' 2.15.0'
85+ implementation group : ' com.fasterxml.jackson.datatype' , name : ' jackson-datatype-jsr310' , version : ' 2.15.0'
86+ implementation group : ' com.amazonaws' , name : ' aws-lambda-java-log4j2' , version : ' 1.5.1'
87+ implementation group : ' org.apache.logging.log4j' , name : ' log4j-core' , version : ' 2.22.1'
88+ implementation group : ' org.apache.logging.log4j' , name : ' log4j-api' , version : ' 2.22.1'
89+ implementation group : ' org.apache.logging.log4j' , name : ' log4j-slf4j-impl' , version : ' 2.22.1'
90+ implementation group : ' org.apache.commons' , name : ' commons-lang3' , version : ' 3.4'
91+ implementation fileTree(dir : ' jars' , include : ' *.jar' )
92+ testImplementation group : ' junit' , name : ' junit' , version : ' 4.13.1'
93+ testImplementation group : ' org.jsoup' , name : ' jsoup' , version : ' 1.15.3'
94+ testImplementation group : ' commons-io' , name : ' commons-io' , version : ' 2.14.0'
95+ testImplementation group : ' com.itextpdf' , name : ' itextpdf' , version : ' 5.5.12'
8396}
8497
8598task buildZip (type : Zip ) {
8699 from compileJava
87100 from processResources
88101 into(' lib' ) {
89- from configurations. runtime
102+ from configurations. runtimeClasspath
90103 }
91104}
92105
@@ -106,5 +119,9 @@ tasks.test {
106119 environment " LAMBDA_TASK_ROOT" , " ./src/main/resources"
107120}
108121
122+ tasks. compileTestJava {
123+ dependsOn buildManifest
124+ }
125+
109126buildZip. dependsOn buildManifest
110127build. dependsOn buildZip
0 commit comments