-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (100 loc) · 3.76 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
113
114
buildscript {
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
mavenCentral()
jcenter()
}
dependencies {
classpath 'se.transmode.gradle:gradle-docker:1.2'
}
}
plugins {
id 'org.springframework.boot' version '2.1.6.RELEASE'
id 'java'
// id 'com.google.cloud.tools.jib' version '1.0.1'
}
apply plugin: 'io.spring.dependency-management'
//apply plugin: 'application'
apply plugin: 'docker'
group = 'com.github.ionething'
version = '1.0.1'
sourceCompatibility = '1.8'
//mainClassName = 'com.github.ionething.sparro.SparrowMiniApplication'
group = "sparrow"
jar {
baseName = 'sparrow-mini'
version = '1.0.1'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven{ url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
mavenCentral()
}
ext {
set('springBootAdminVersion', '2.1.3')
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
// implementation 'org.springframework.boot:spring-boot-starter-actuator'
// implementation 'org.springframework.boot:spring-boot-starter-amqp'
// implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-cache'
// implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-security'
// implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// implementation 'org.springframework.boot:spring-boot-starter-websocket'
// implementation 'de.codecentric:spring-boot-admin-starter-client'
// implementation 'de.codecentric:spring-boot-admin-starter-server'
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.0'
implementation 'com.baomidou:mybatis-plus-boot-starter:3.1.0'
implementation 'io.springfox:springfox-swagger2:2.9.2'
implementation 'io.springfox:springfox-swagger-ui:2.9.2'
// implementation 'com.google.guava:guava:27.0.1-jre'
implementation 'com.alibaba:fastjson:1.2.56'
// implementation 'org.jodd:jodd-bean:5.0.8'
// implementation 'org.jodd:jodd-props:5.0.8'
// implementation 'org.jodd:jodd-http:5.0.8'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'mysql:mysql-connector-java'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// testImplementation 'org.springframework.security:spring-security-test'
}
dependencyManagement {
imports {
mavenBom "de.codecentric:spring-boot-admin-dependencies:${springBootAdminVersion}"
}
}
def dockerRepo = "192.168.0.251:9021"
task dockerBuilder(type: Docker, dependsOn: build) {
applicationName = jar.baseName
tagVersion = jar.version
push = project.hasProperty('push')
tag = "${dockerRepo}/${project.group}/${applicationName}"
// push = true
dockerfile = file('src/main/docker/Dockerfile')
doFirst {
copy {
from jar
rename { 'app.jar' }
into stageDir
}
}
}