forked from capitalone/oas-nodegen-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
92 lines (73 loc) · 2.3 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springboot_version}")
}
}
import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
group = "oai-nodegen-example"
version = '1.0.0'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile "org.mockito:mockito-all:1.10.19"
testCompile "org.springframework.boot:spring-boot-starter-test:${springboot_version}"
testCompile "org.hamcrest:hamcrest-all:1.3"
compile "org.apache.commons:commons-lang3:3.4"
compile "javax.inject:javax.inject:1"
compile "javax.validation:validation-api:1.1.0.Final"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson_version}"
compile "com.fasterxml.jackson.module:jackson-module-afterburner:${jackson_version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:${jackson_version}"
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson_version}"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jackson_version}"
compile "org.springframework.boot:spring-boot-starter-jersey:${springboot_version}"
compile "org.springframework.boot:spring-boot-starter-tomcat:${springboot_version}"
compile "org.springframework.boot:spring-boot-starter-actuator:${springboot_version}"
compile "org.springframework.boot:spring-boot-starter-data-mongodb:${springboot_version}"
}
eclipse {
classpath {
downloadSources = true
downloadJavadoc = true
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.10'
}
def generatedSourceDir = "$projectDir/build/generated-src/main/java"
ext {
npmCommand = Os.isFamily(Os.FAMILY_WINDOWS) ? 'npm.cmd' : 'npm'
}
task npmInstall(type: Exec) {
commandLine npmCommand, 'install'
}
task npmBuild(type: Exec) {
commandLine npmCommand, 'run', 'build'
}
npmBuild.dependsOn npmInstall
compileJava.dependsOn npmBuild
sourceSets {
main {
output.dir(generatedSourceDir, builtBy: 'npmBuild')
java.srcDirs generatedSourceDir
}
}
clean {
delete generatedSourceDir
}
idea {
module {
sourceDirs += file(generatedSourceDir)
}
}