-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (84 loc) · 2.97 KB
/
build.gradle
File metadata and controls
100 lines (84 loc) · 2.97 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
plugins {
id 'java-library'
id 'pmd'
id 'maven-publish'
id 'org.cyclonedx.bom' version '3.0.2'
}
group = 'uk.gov.hmcts.cp'
version = System.getProperty('ARTEFACT_VERSION') ?: '0.0.999'
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
def githubActor = project.findProperty("github.actor") ?: System.getenv("GITHUB_ACTOR")
def githubToken = project.findProperty("github.token") ?: System.getenv("GITHUB_TOKEN")
def githubRepo = System.getenv("GITHUB_REPOSITORY")
def azureADOArtifactRepository = 'https://pkgs.dev.azure.com/hmcts/Artifacts/_packaging/hmcts-lib/maven/v1'
def azureADOArtifactActor = System.getenv("AZURE_DEVOPS_ARTIFACT_USERNAME")
def azureADOArtifactToken = System.getenv("AZURE_DEVOPS_ARTIFACT_TOKEN")
repositories {
mavenLocal()
mavenCentral()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/$githubRepo")
credentials {
username = githubActor
password = githubToken
}
}
maven {
name = "AzureArtifacts"
url = uri(azureADOArtifactRepository)
credentials {
username = azureADOArtifactActor
password = azureADOArtifactToken
}
}
}
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
ext {
springBootVersion = "3.5.7"
lombokVersion = "1.18.42"
jacksonVersion = "2.20.1"
jupiterVersion = "6.0.1"
}
dependencies {
compileOnly "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
testImplementation "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
// --- Lombok for main and test code ---
compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testCompileOnly "org.projectlombok:lombok:${lombokVersion}"
testAnnotationProcessor "org.projectlombok:lombok:${lombokVersion}"
testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$jupiterVersion"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$jupiterVersion"
testImplementation "org.junit.platform:junit-platform-launcher:$jupiterVersion"
// Project specific dependencies
implementation "org.springframework.boot:spring-boot-starter-artemis:$springBootVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion"
implementation "io.swagger.parser.v3:swagger-parser:2.1.35"
// Mapper
implementation "org.mapstruct:mapstruct:1.6.3"
annotationProcessor "org.mapstruct:mapstruct-processor:1.6.3"
// Testcontainers
testImplementation 'org.testcontainers:testcontainers:1.19.7'
testImplementation 'org.testcontainers:junit-jupiter:1.19.7'
}
jar {
exclude("uk/gov/hmcts/cp/audit/DummySpringApplication.class")
}