-
Notifications
You must be signed in to change notification settings - Fork 326
/
Copy pathbuild.gradle
35 lines (33 loc) · 1.13 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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE")
//引入gradle-docker
classpath('gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.19.2')
}
}
//引入构建docker插件
apply plugin: 'com.palantir.docker'
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
group = 'registry.acs.aliyun.com/35013893'
version = project.findProperty('projVersion') ?: '1.0.0'
mainClassName = 'com.dashuai.learning.sentinel.SentinelApplication'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
compile project(':SpringBoot-Support')
compile 'org.springframework.cloud:spring-cloud-starter-alibaba-sentinel:0.2.2.RELEASE'
}
//具体配置生成镜像
docker {
dockerfile file('Dockerfile')
name "${project.group}/springboot-sentinel-test:${project.version}"
files jar.archivePath
buildArgs(['JAR_FILE': "${jar.archiveName}"])
}