-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
115 lines (88 loc) · 3.03 KB
/
Copy pathbuild.gradle
File metadata and controls
115 lines (88 loc) · 3.03 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
plugins {
id 'application'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.springframework.boot' version '3.5.5'
id 'com.github.ben-manes.versions' version '0.52.0'
// TODO: need to add checkstyle
}
application {
mainClass = 'uk.gov.hmcts.reform.dataViewstoreRestApi.Application'
group = 'uk.gov.hmcts.reform'
version = '0.0.1'
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir "src/integrationTest/java"
}
resources.srcDir "src/integrationTest/resources"
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom runtimeOnly
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Werror"
}
// https://github.com/gradle/gradle/issues/16791
tasks.withType(JavaExec).configureEach {
javaLauncher.set(javaToolchains.launcherFor(java.toolchain))
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
failFast = true
testLogging {
exceptionFormat = 'full'
}
}
tasks.register('integration', Test) {
description = "Runs integration tests"
group = "Verification"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
failFast = true
}
tasks.check.dependsOn(integration)
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri('https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1')
}
}
ext['snakeyaml.version'] = '2.0'
dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-json'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa'
implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webmvc-ui', version: '2.8.14'
runtimeOnly group: 'com.h2database', name: 'h2'
runtimeOnly group: 'org.postgresql', name: 'postgresql'
compileOnly group: 'org.projectlombok', name: 'lombok'
annotationProcessor group: 'org.projectlombok', name: 'lombok'
testCompileOnly group: 'org.projectlombok', name: 'lombok'
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok'
// HMCTS specific
implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '6.1.9'
testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test'
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '5.5.6'
}
bootJar {
archiveFileName = "mi-dev.jar"
manifest {
attributes('Implementation-Version': project.version.toString())
}
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
}