11plugins {
22 // Apply the java plugin to add support for Java
3- id ' java'
3+ id ' java-library '
44
55 // Apply the application plugin to add support for building an application
66 id ' application'
@@ -13,48 +13,46 @@ targetCompatibility = 1.8
1313compileJava. options. encoding = ' UTF-8'
1414
1515repositories {
16- // Use jcenter for resolving your dependencies.
17- // You can declare any Maven/Ivy/file repository here.
1816 mavenCentral()
1917}
2018
2119dependencies {
22- compile ' com.google.guava:guava:31.1-jre'
23- compile ' com.google.inject:guice:5.1.0'
24- compile ' commons-cli:commons-cli:1.5.0'
20+ implementation ' com.google.guava:guava:31.1-jre'
21+ implementation ' com.google.inject:guice:5.1.0'
22+ implementation ' commons-cli:commons-cli:1.5.0'
2523
26- compile ' org.apache.logging.log4j:log4j-api:2.18.0'
27- compile ' org.apache.logging.log4j:log4j-slf4j-impl:2.18.0'
28- compile ' org.apache.logging.log4j:log4j-1.2-api:2.18.0'
29- compile ' org.apache.logging.log4j:log4j-core:2.18.0'
24+ implementation ' org.apache.logging.log4j:log4j-api:2.18.0'
25+ implementation ' org.apache.logging.log4j:log4j-slf4j-impl:2.18.0'
26+ implementation ' org.apache.logging.log4j:log4j-1.2-api:2.18.0'
27+ implementation ' org.apache.logging.log4j:log4j-core:2.18.0'
3028
31- compile ' org.apache.olingo:odata-client-api:4.9.0'
32- compile ' org.apache.olingo:odata-commons-core:4.9.0'
33- compile ' org.apache.olingo:odata-client-core:4.9.0'
29+ implementation ' org.apache.olingo:odata-client-api:4.9.0'
30+ implementation ' org.apache.olingo:odata-commons-core:4.9.0'
31+ implementation ' org.apache.olingo:odata-client-core:4.9.0'
3432
35- compile ' org.apache.poi:poi:5.2.2'
36- compile ' org.apache.poi:poi-ooxml:5.2.2'
33+ implementation ' org.apache.poi:poi:5.2.2'
34+ implementation ' org.apache.poi:poi-ooxml:5.2.2'
3735
38- compile ' io.rest-assured:rest-assured:5.1.1'
39- compile ' io.rest-assured:json-path:5.1.1'
40- compile ' io.rest-assured:json-schema-validator:5.1.1'
36+ implementation ' io.rest-assured:rest-assured:5.1.1'
37+ implementation ' io.rest-assured:json-path:5.1.1'
38+ implementation ' io.rest-assured:json-schema-validator:5.1.1'
4139
42- compile ' io.cucumber:cucumber-java8:7.1.0'
43- compile ' io.cucumber:cucumber-java:7.1.0'
44- compile ' io.cucumber:cucumber-junit:7.1.0'
45- compile ' io.cucumber:cucumber-guice:7.1.0'
46- compile ' io.cucumber:cucumber-core:7.1.0'
40+ implementation ' io.cucumber:cucumber-java8:7.1.0'
41+ implementation ' io.cucumber:cucumber-java:7.1.0'
42+ implementation ' io.cucumber:cucumber-junit:7.1.0'
43+ implementation ' io.cucumber:cucumber-guice:7.1.0'
44+ implementation ' io.cucumber:cucumber-core:7.1.0'
4745
4846 // TODO: choose one schema validator between this and rest-assured
49- compile ' com.networknt:json-schema-validator:1.0.70'
50- compile ' com.google.code.gson:gson:2.9.0'
51- compile ' org.apache.commons:commons-text:1.9'
47+ implementation ' com.networknt:json-schema-validator:1.0.70'
48+ implementation ' com.google.code.gson:gson:2.9.0'
49+ implementation ' org.apache.commons:commons-text:1.9'
5250
5351}
5452
5553configurations {
5654 cucumberRuntime {
57- extendsFrom compile
55+ extendsFrom implementation
5856 }
5957}
6058
@@ -63,17 +61,16 @@ jar {
6361 attributes " Main-Class" : mainClassName
6462 }
6563
64+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
65+
6666 from {
67- configurations. compile . collect { it. isDirectory() ? it : zipTree(it) }
67+ configurations. runtimeClasspath . collect { it. isDirectory() ? it : zipTree(it) }
6868 }
69- exclude ' META-INF/*.RSA'
70- exclude ' META-INF/*.SF'
71- exclude ' META-INF/*.DSA'
7269}
7370
7471
7572// don't suppress warnings or deprecation notices
76- tasks. withType(JavaCompile ) {
73+ tasks. withType(JavaCompile ). configureEach {
7774 options. compilerArgs << ' -Xlint:unchecked'
7875 options. deprecation = true
7976}
@@ -87,21 +84,21 @@ final String certOutputDir = 'build' + File.separator + 'certification',
8784 certReportsDir = certOutputDir + File . separator + ' reports' ,
8885 certResultsDir = certOutputDir + File . separator + ' results'
8986
90- task prepareCertificationEnvironment ( ) {
91- doLast {
92- def folder = new File (certOutputDir)
93- if (folder. exists()) {
94- delete certOutputDir
95- }
96-
87+ tasks . register( ' prepareCertificationEnvironment ' ) {
88+ doLast {
89+ def folder = new File (certOutputDir)
90+ if (folder. exists()) {
91+ delete certOutputDir
92+ }
93+
9794 mkdir certOutputDir
9895 mkdir cucumberJsonPath
9996 mkdir certReportsDir
10097 mkdir certResultsDir
10198 }
10299}
103100
104- task testWebApiCore_2_0_0 ( ) {
101+ tasks . register( ' testWebApiCore_2_0_0 ' ) {
105102 group = ' RESO Certification'
106103 description = ' Web API Core 2.0.0 Acceptance Tests' +
107104 ' \n Example: ' +
@@ -116,7 +113,7 @@ task testWebApiCore_2_0_0() {
116113 dependsOn jar, prepareCertificationEnvironment
117114 doLast {
118115 javaexec {
119- main = " io.cucumber.core.cli.Main"
116+ mainClass = " io.cucumber.core.cli.Main"
120117 classpath = configurations. cucumberRuntime + sourceSets. main. output + sourceSets. test. output
121118 systemProperties = System . getProperties()
122119
@@ -137,7 +134,7 @@ task testWebApiCore_2_0_0() {
137134 }
138135}
139136
140- task testDataDictionary_1_7 ( ) {
137+ tasks . register( ' testDataDictionary_1_7 ' ) {
141138 group = ' RESO Certification'
142139 description = ' Data Dictionary 1.7 Acceptance Tests' +
143140 ' \n RESOScript Example:' +
@@ -178,13 +175,13 @@ task testDataDictionary_1_7() {
178175 }
179176
180177 argsArray. addAll(
181- ' --plugin' ,
182- ' json:' + cucumberJsonPath + ' /' + reportName + ' .json' ,
183- ' --plugin' ,
184- ' html:' + certReportsDir + ' /' + reportName + ' .html' ,
185- ' --glue' ,
186- ' org.reso.certification.stepdefs#DataDictionary' ,
187- ' src/main/java/org/reso/certification/features/data-dictionary/v1-7-0'
178+ ' --plugin' ,
179+ ' json:' + cucumberJsonPath + ' /' + reportName + ' .json' ,
180+ ' --plugin' ,
181+ ' html:' + certReportsDir + ' /' + reportName + ' .html' ,
182+ ' --glue' ,
183+ ' org.reso.certification.stepdefs#DataDictionary' ,
184+ ' src/main/java/org/reso/certification/features/data-dictionary/v1-7-0'
188185 )
189186
190187 if (systemProperties. hasProperty(' cucumber.filter.tags' )) {
@@ -197,7 +194,7 @@ task testDataDictionary_1_7() {
197194 }
198195}
199196
200- task testDataAvailability_1_7 ( ) {
197+ tasks . register( ' testDataAvailability_1_7 ' ) {
201198 group = ' RESO Certification'
202199 description = ' Data Dictionary 1.7 Data Availability Tests' +
203200 ' \n Example:' +
@@ -210,7 +207,7 @@ task testDataAvailability_1_7() {
210207 dependsOn jar
211208 doLast {
212209 javaexec {
213- main = " io.cucumber.core.cli.Main"
210+ mainClass = " io.cucumber.core.cli.Main"
214211 classpath = configurations. cucumberRuntime + sourceSets. main. output + sourceSets. test. output
215212 systemProperties = System . getProperties()
216213
@@ -239,7 +236,7 @@ task testDataAvailability_1_7() {
239236 }
240237}
241238
242- task testIdxPayload_1_7 ( ) {
239+ tasks . register( ' testIdxPayload_1_7 ' ) {
243240 group = ' RESO Certification'
244241 description = ' Data Dictionary 1.7 Payloads Sampling Tests' +
245242 ' \n Example:' +
@@ -252,7 +249,7 @@ task testIdxPayload_1_7() {
252249 dependsOn jar
253250 doLast {
254251 javaexec {
255- main = " io.cucumber.core.cli.Main"
252+ mainClass = " io.cucumber.core.cli.Main"
256253 classpath = configurations. cucumberRuntime + sourceSets. main. output + sourceSets. test. output
257254 systemProperties = System . getProperties()
258255
@@ -271,12 +268,12 @@ task testIdxPayload_1_7() {
271268 }
272269}
273270
274- task testDataDictionaryReferenceMetadata_1_7 ( ) {
271+ tasks . register( ' testDataDictionaryReferenceMetadata_1_7 ' ) {
275272 description = ' Runs Data Dictionary tests against reference metadata'
276273 dependsOn jar
277274 doLast {
278275 javaexec {
279- main = " io.cucumber.core.cli.Main"
276+ mainClass = " io.cucumber.core.cli.Main"
280277 classpath = configurations. cucumberRuntime + sourceSets. main. output + sourceSets. test. output
281278 System . setProperty(' pathToMetadata' , ' src/main/resources/RESODataDictionary-1.7.xml' )
282279 systemProperties = System . getProperties()
@@ -298,7 +295,7 @@ test {
298295 dependsOn assemble, compileTestJava, testDataDictionaryReferenceMetadata_1_7
299296 doLast {
300297 javaexec {
301- main = " io.cucumber.core.cli.Main"
298+ mainClass = " io.cucumber.core.cli.Main"
302299 classpath = configurations. cucumberRuntime + sourceSets. main. output + sourceSets. test. output
303300 args = [
304301 ' --plugin' ,
0 commit comments