-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
54 lines (48 loc) · 1.82 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
plugins {
// OpenAPGeneratePlugin追加
// https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-gradle-plugin
id "org.openapi.generator" version "4.2.1"
id 'org.springframework.boot' version '2.2.1.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
openApiGenerate {
generatorName = "spring"
configFile = "$rootDir/specs/config.json".toString()
inputSpec = "$rootDir/specs/petstore-v3.0.yaml".toString()
outputDir = "$buildDir/generated".toString()
apiPackage = "org.openapi.example.api"
invokerPackage = "org.openapi.example.invoker"
modelPackage = "org.openapi.example.model"
configOptions = [
dateLibrary: "java8"
]
systemProperties = [
modelDocs: 'false'
]
}
compileJava.dependsOn tasks.openApiGenerate
sourceSets.main.java.srcDir "${openApiGenerate.outputDir.get()}/src/main/java"
sourceSets.main.resources.srcDir "${openApiGenerate.outputDir.get()}/src/main/resources"
repositories {
sourceCompatibility = '11'
targetCompatibility = '11'
group = 'task'
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
// OpenAPIで必要なライブラリ
compile group: 'com.google.code.gson', name: 'gson'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
compile group: 'org.openapitools', name: 'jackson-databind-nullable', version: '0.1.0'
}
test {
useJUnitPlatform()
}