-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
69 lines (55 loc) · 2.15 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
plugins {
id 'org.openapi.generator' version '7.10.0'
}
apply plugin: 'uk.gov.laa.ccms.springboot.laa-ccms-spring-boot-gradle-plugin'
dependencies {
implementation 'io.swagger.core.v3:swagger-annotations:2.2.27'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.data:spring-data-commons'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'com.fasterxml.jackson.core:jackson-databind'
}
publishing {
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
sourceSets.main.java.srcDirs += ['generated/src/main/java']
checkstyleMain.exclude "*"
openApiGenerate {
generatorName = "spring"
inputSpec = "$rootDir/assessment-api/open-api-specification.yml".toString() // Change this to the location of your OpenAPI specification
outputDir = "$rootDir/assessment-api/generated".toString()
apiPackage = "uk.gov.laa.ccms.caab.assessment.api"
modelPackage = "uk.gov.laa.ccms.caab.assessment.model"
invokerPackage = "uk.gov.laa.ccms.caab.assessment.invoker"
configOptions = [
delegatePattern : "false",
interfaceOnly : "true", // This will only generate interfaces, not implementations
dateLibrary : "legacy",
useTags : "true",
skipDefaultInterface : "true",
useJakartaEe : "true",
documentationProvider : "none",
serializableModel : "true",
annotationLibrary : "swagger2",
useSpringBoot3 : "true"
]
}
compileJava.dependsOn 'openApiGenerate'
clean {
delete "$rootDir/assessment-api/generated"
}
// disable for overall project when running a build
tasks.named('bootJar') {
enabled = false
}
tasks.named('bootRun') {
enabled = false
}