-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
77 lines (69 loc) · 2.25 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
buildscript {
repositories {
maven { url "http://nexus.team.fengchaoli.com/repository/maven-public" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "se.transmode.gradle:gradle-docker:${transmodeGradleDockerVersion}"
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
allprojects {
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'registry.cn-shenzhen.aliyuncs.com/nothing'
version = '1.0'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
maven { url "http://nexus.team.fengchaoli.com/repository/maven-public" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.projectlombok:lombok')
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8")
compile("org.jetbrains.kotlin:kotlin-reflect")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
if (project.subprojects) {
bootRepackage {
enabled = false
}
} else {
apply plugin: 'docker'
docker {
maintainer = 'zhoujundi <[email protected]>'
baseImage = 'openjdk:8-jre-alpine'
}
task dockerBuild(type: Docker, dependsOn: build) {
applicationName = project.name
addFile {
from configurations.archives.artifacts.files
into '/data/workspace/' + project.name
}
workingDir '/data/workspace/' + project.name
setEnvironment('HOST_MACHINE_IP', hostMachineIp)
defaultCommand(['java', '-jar', '-Dspring.profiles.active=test', "${project.name}-${project.version}.jar"])
}
}
}