-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
112 lines (98 loc) · 2.85 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
buildscript {
ext {
kotlinVersion = '1.3.30'
springBootVersion = '2.0.6.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath "com.moowork.gradle:gradle-node-plugin:1.3.1"
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'io.spring.dependency-management'
apply plugin: "com.moowork.node"
ext['kotlin.version'] = ext.kotlinVersion
node {
download = "$System.env.JITPACK"
workDir = file("${project.projectDir}/src/javascript/nodejs")
// Set the work directory for NPM
npmWorkDir = file("${project.projectDir}/src/javascript/npm")
// Set the work directory for Yarn
yarnWorkDir = file("${project.projectDir}/src/javascript/yarn")
nodeModulesDir = file("${project.projectDir}/src/javascript")
}
group = 'jp.co.esm.its'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = JavaVersion.VERSION_1_8
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
implementation 'org.springframework:spring-jdbc'
implementation 'org.springframework:spring-webmvc'
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation('com.fasterxml.jackson.module:jackson-module-kotlin')
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
testCompile "org.jetbrains.kotlin:kotlin-test-junit"
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile("org.springframework.boot:spring-boot-starter-jdbc")
testCompile("org.springframework.boot:spring-boot-starter-web")
testCompile('com.h2database:h2')
}
task npmRunBuild(type: YarnTask, dependsOn: yarn_install) {
args = ['run', 'build']
}
test.dependsOn npm_test
classes.dependsOn npmRunBuild
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
// To specify a license in the pom:
install {
repositories.mavenInstaller {
pom.project {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
}
}
}