-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
129 lines (108 loc) · 4.43 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
118
119
120
121
122
123
124
125
126
127
128
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.0/userguide/java_library_plugin.html
*/
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'jacoco'
id 'application'
id 'org.sonarqube' version '3.0'
id "com.github.johnrengelman.shadow" version "6.0.0"
id "com.diffplug.spotless" version "6.3.0"
}
version = 0.2
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
spotless {
java {
googleJavaFormat()
removeUnusedImports()
target 'src/**/*.java'
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenLocal()
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
gradlePluginPortal()
}
dependencies {
implementation fileTree('src/libs') { include 'testng-7.4.0-RESTEL.jar' }
// implementation project(":testng-restel")
compileOnly "org.projectlombok:lombok:1.18.24"
annotationProcessor "org.projectlombok:lombok:1.18.24"
implementation group: 'io.qameta.allure', name: 'allure-gradle', version: '2.5'
implementation group: 'io.qameta.allure', name: 'allure-testng', version: '2.13.3'
implementation group: 'org.springframework.batch', name: 'spring-batch-core', version: '4.2.4.RELEASE'
implementation group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
// https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api
implementation group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.1.1'
implementation group: 'org.apache.poi', name: 'poi', version: '4.1.2'
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '4.1.2'
// https://mvnrepository.com/artifact/io.swagger.parser.v3/swagger-parser
implementation group: 'io.swagger.parser.v3', name: 'swagger-parser', version: '2.0.22'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.11'
// https://mvnrepository.com/artifact/com.networknt/json-schema-validator
implementation group: 'com.networknt', name: 'json-schema-validator', version: '1.0.43'
// https://mvnrepository.com/artifact/com.github.fslev/json-compare
implementation group: 'com.github.fslev', name: 'json-compare', version: '2.15'
// Test and supporting libs
testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.7'
testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.7'
// For test container
testImplementation 'org.testcontainers:junit-jupiter:1.17.1'
testImplementation 'org.testcontainers:testcontainers:1.17.1'
// Dependencies to support both junit 4 and 5
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testCompileOnly 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.8.2'
// To support setting of custom env variables during test
testImplementation 'com.github.stefanbirkner:system-rules:1.19.0'
testImplementation 'com.github.stefanbirkner:system-lambda:1.2.1'
}
compileJava {
options.annotationProcessorPath = configurations.annotationProcessor
}
task(runSwagger, dependsOn: 'classes', type: JavaExec) {
mainClass = 'com.techconative.restel.oas.RestelWriterApplication'
classpath = sourceSets.main.runtimeClasspath
}
// Include dependent libraries in archive.
mainClassName = "com.techconative.restel.core.RestelApplication"
sonarqube {
properties {
property "sonar.host.url", "http://localhost:9000"
}
}
jacoco {
toolVersion = "0.8.5"
}
test {
useJUnitPlatform()
finalizedBy(jacocoTestReport)
}
tasks['sonarqube'].dependsOn test
//Source https://docs.gradle.org/current/userguide/jacoco_plugin.html
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.enabled true
csv.enabled false
}
}