-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
95 lines (76 loc) · 3.03 KB
/
Copy pathbuild.gradle
File metadata and controls
95 lines (76 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
plugins {
id 'org.springframework.boot' version '2.3.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id 'org.asciidoctor.convert' version '1.5.3'
id 'org.hidetake.swagger.generator' version '1.4.0'
id 'war'
}
ext {
springFoxArtifacts = ["springfox-swagger2", "springfox-swagger-ui"]
springFoxVersion = "2.6.0"
swaggerCodeGenVersion = "2.2.1"
}
group = 'com.programflow'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
jcenter()
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
compile("org.springframework.boot:spring-boot-starter-web")
testCompile 'junit:junit:4.12'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation('org.springframework.boot:spring-boot-starter-webflux')
compileOnly('org.projectlombok:lombok')
testImplementation('io.projectreactor:reactor-test')
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
// https://mvnrepository.com/artifact/org.springframework.security/spring-security-crypto
compile group: 'org.springframework.security', name: 'spring-security-crypto', version: '3.1.0.RELEASE'
compile group: 'org.modelmapper', name: 'modelmapper', version: '2.3.7'
compile("org.springframework.boot:spring-boot-starter-web")
swaggerCodegen("io.swagger:swagger-codegen-cli:$swaggerCodeGenVersion")
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
// https://mvnrepository.com/artifact/org.modelmapper/modelmapper
springFoxArtifacts.each {
artifact -> compile("io.springfox:$artifact:$springFoxVersion")
}
}
}
task copySwaggerGeneratedCode(type: Copy) {
from "${buildDir}/swagger-code"
into "${projectDir}"
}
generateSwaggerCode {
configFile = file('src/main/resources/swagger/config.json')
components = ['models', 'apis']
inputFile = file('src/main/resources/swagger/petstore-api.json')
language = 'spring'
}
generateSwaggerCode.finalizedBy(project.tasks.copySwaggerGeneratedCode)
generateSwaggerDoc {
inputFile = file('src/main/resources/swagger/petstore-api.json')
}
test {
useJUnitPlatform()
}