-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
176 lines (148 loc) · 5.19 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
plugins {
id 'org.springframework.boot' version '2.5.2' apply false
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'jacoco'
id "org.sonarqube" version '2.8'
id 'maven-publish'
}
group = 'com.searchservice.ingress.lib'
//SNAPSHOT-REPO-VERSION
//version = '0.0.1-SNAPSHOT'
//RELEASE-AND PROXY-REPO-VERSION
version = '0.0.1-RELEASE'
//MIXED-VERSION
//version = '0.0.1-MIXED'
sourceCompatibility = '11'
apply from: "gradle/sonar.gradle"
//apply plugin: 'maven-publish'
publishing {
publications {
maven(MavenPublication) {
//SNAPSHOT-REPO
//version = '1.0-SNAPSHOT'
//RELEASE-REPO
version = '1.0-RELEASE'
//PROXY-REPO
//version = '1.0-PROXY'
//MIXED-REPO
//version = '1.0-MIXED'
artifact("/build/libs/clientlib.jar"){
extension 'jar'
}
}
}
repositories {
maven {
name 'nexus'
url 'http://localhost:8081/repository/nexus-client-ingress-release/'
//url 'http://localhost:8081/repository/nexus-client-ingress-snapshot/'
//url 'http://localhost:8081/repository/nexus-client-ingress-proxy/'
//url 'http://localhost:8081/repository/nexus-client-ingress-group/'
allowInsecureProtocol = true
credentials {
username project.nexusUsername
password project.nexusPassword
}
}
}
}
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
//// create FAT jar ////
task clientLibraryCustomJar(type: Jar) {
//bootRepackage.enabled = false
zip64 = true
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
//attributes 'Main-Class': 'com.solr.clientwrapper.BasicSampleApp'
}
//baseName = 'clientlib'
archivesBaseName = 'clientlib'
if (project.hasProperty('projVersion')) {
project.version = project.projVersion
} else {
project.version = ''
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
apply plugin: "eclipse"
test {
useJUnitPlatform()
exclude "**/*IT*", "**/*IntTest*"
testLogging {
events 'FAILED', 'SKIPPED'
}
jvmArgs += '-Djava.security.egd=file:/dev/./urandom -Xmx256m'
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.enabled = false
}
task integrationTest(type: Test) {
useJUnitPlatform()
description = "Execute integration tests."
group = "verification"
include "**/*IT*", "**/*IntTest*"
testLogging {
events 'FAILED', 'SKIPPED'
}
jvmArgs += '-Djava.security.egd=file:/dev/./urandom -Xmx256m'
if (project.hasProperty('testcontainers')) {
environment 'spring.profiles.active', 'testcontainers'
}
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.enabled = false
}
check.dependsOn integrationTest
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/tests")
reportOn test
}
task integrationTestReport(type: TestReport) {
destinationDir = file("$buildDir/reports/tests")
reportOn integrationTest
}
jacocoTestReport {
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.6.2'
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
implementation "org.apache.commons:commons-lang3"
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.1'
implementation group: 'org.json', name: 'json', version: '20200518'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.13.1'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.1'
//sonar
implementation group: 'com.google.code.gson', name: 'gson', version: '2.9.0'
// https://mvnrepository.com/artifact/joda-time/joda-time
implementation group: 'joda-time', name: 'joda-time', version: '2.10.13'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: '2.5.4'
implementation group: 'org.jboss.logging', name: 'jboss-logging', version: '3.5.0.Final'
}
repositories {
mavenCentral()
//// create FAT jar ////
jcenter()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}