-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (79 loc) · 3.17 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
plugins {
id 'java'
id 'org.springframework.boot' version "${springBootVersion}"
id 'io.spring.dependency-management' version "${springDependencyManagementVersion}"
id 'org.openapi.generator' version "${openapiGeneratorVersion}"
}
group = 'pl.zajavka'
version = '1.0'
sourceCompatibility = '17'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
//spring
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-security'
//db
implementation 'org.flywaydb:flyway-core'
runtimeOnly 'org.postgresql:postgresql'
//annotation
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:${lombokMapstructBindingVersion}"
//api
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocOpenApiVersion}"
implementation "org.openapitools:jackson-databind-nullable:${jacksonDatabindNullableVersion}"
implementation "javax.annotation:javax.annotation-api:${javaxAnnotationApiVersion}"
implementation "io.swagger:swagger-annotations:${swaggerAnnotationVersion}"
implementation "com.google.code.findbugs:jsr305:${jsr305Version}"
//tests
testRuntimeOnly 'com.h2database:h2'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
//integration tests
testImplementation "org.slf4j:slf4j-api:${wiremockSlf4jVersion}"
testImplementation "com.github.tomakehurst:wiremock-standalone:${wiremockVersion}"
testImplementation "io.rest-assured:rest-assured:${restAssuredVersion}"
}
//http://www.cepik.gov.pl/interfejs-dla-cepik
//https://api.cepik.gov.pl/doc
openApiGenerate {
generatorName = "java"
library = "webclient"
configOptions = [
serializableModel : "true",
dateLibrary : "java8",
serializationLibrary: "jackson"
]
outputDir = "$buildDir/generated-sources/openapi".toString()
inputSpec = "$rootDir/src/main/resources/contracts/cepik-1.1.3.json".toString()
apiPackage = "pl.zajavka.infrastructure.cepik.api"
modelPackage = "pl.zajavka.infrastructure.cepik.model"
}
sourceSets {
main {
java.srcDirs += "$buildDir/generated-sources/openapi/src/main/java"
}
}
compileJava.dependsOn tasks.openApiGenerate
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
compileJava.options.encoding = "UTF-8"