-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
192 lines (155 loc) · 5.19 KB
/
build.gradle
File metadata and controls
192 lines (155 loc) · 5.19 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
plugins {
id 'checkstyle'
id 'org.springframework.boot' version '3.4.5'
id 'com.github.ben-manes.versions' version '0.52.0'
id 'se.patrikerdes.use-latest-versions' version '0.2.19'
id 'java-library'
id 'maven-publish'
}
apply plugin: 'io.spring.dependency-management'
def buildNumber = System.getenv("RELEASE_VERSION")?: "DEV-SNAPSHOT"
group 'com.github.hmcts'
version buildNumber
checkstyle {
maxWarnings = 0
toolVersion = '11.0.1'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
compileJava {
options.compilerArgs << '-parameters' << '-Xlint:deprecation'
}
compileTestJava {
options.compilerArgs << '-Xlint:deprecation'
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1'
name 'HMCTS common libraries'
}
}
jar {
manifest {
attributes 'Implementation-Title': project.name, 'Implementation-Version': project.version
}
}
task printVersion {
doLast {
print project.version
}
}
def pomConfig = {
licenses {
license {
name "MIT License"
url "https://www.opensource.org/licenses/MIT"
distribution "repo"
}
}
scm {
url "https://github.com/hmcts/ccd-client"
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
def gitRepo = "https://github.com/hmcts/ccd-client"
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Core case data store client'
description = 'Core case data store client'
url = gitRepo
licenses {
license {
name = 'MIT License, Copyright (c) 2023 HM Courts & Tribunals Service'
url = "https://www.opensource.org/licenses/MIT"
}
}
scm {
url = gitRepo
}
}
}
}
repositories {
maven {
name = "AzureArtifacts"
url = uri("https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1")
credentials {
username = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
password = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
}
}
}
}
ext {
lombokVersion = '1.18.40'
}
sourceSets {
functionalTest {
compileClasspath += sourceSets.main.output
runtimeClasspath += sourceSets.main.output
}
}
configurations {
functionalTestImplementation.extendsFrom testImplementation
functionalTestRuntimeOnly.extendsFrom testRuntimeOnly
}
task functionalTest(type: Test) {
description = 'Runs functional tests.'
group = 'verification'
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
}
dependencies {
implementation(platform("org.springframework.cloud:spring-cloud-dependencies:2024.0.2"))
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-openfeign'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'io.github.openfeign', name: 'feign-jackson'
implementation group: 'org.projectlombok', name: 'lombok', version: lombokVersion
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.13.4'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testImplementation group: 'com.github.tomakehurst', name: 'wiremock-standalone', version: '3.0.1'
testImplementation group: 'com.google.guava', name: 'guava', version: '33.4.8-jre'
testImplementation group: 'org.projectlombok', name: 'lombok', version: lombokVersion
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
functionalTestImplementation group: 'com.github.hmcts', name: 'service-auth-provider-java-client', version: '5.3.3'
functionalTestImplementation group: 'com.github.hmcts', name: 'idam-java-client', version: '3.0.4'
functionalTestImplementation group: 'org.assertj', name: 'assertj-core', version: '3.27.0'
functionalTestCompileOnly group: 'org.projectlombok', name: 'lombok', version: lombokVersion
functionalTestAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: lombokVersion
functionalTestImplementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-parameter-names', version: '2.20.0'
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
tasks.withType(Test) {
useJUnitPlatform()
}
bootJar {
enabled = false
}
jar {
enabled = true
archiveClassifier = ''
}