1
1
buildscript {
2
- ext {
3
- springBootVersion = ' 2.0.4.RELEASE'
4
- }
5
- repositories {
6
- mavenCentral()
7
- }
8
- dependencies {
9
- classpath(" org.springframework.boot:spring-boot-gradle-plugin:${ springBootVersion} " )
10
- }
2
+ ext {
3
+ springBootVersion = ' 2.0.4.RELEASE'
4
+ }
5
+ repositories {
6
+ mavenCentral()
7
+ maven {
8
+ url " https://plugins.gradle.org/m2/"
9
+ }
10
+ }
11
+ dependencies {
12
+ classpath(" org.springframework.boot:spring-boot-gradle-plugin:${ springBootVersion} " )
13
+ classpath(' gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.20.1' )
14
+ }
11
15
}
12
16
13
17
apply plugin : ' java'
14
18
apply plugin : ' eclipse'
15
19
apply plugin : ' org.springframework.boot'
16
20
apply plugin : ' io.spring.dependency-management'
21
+ apply plugin : ' com.palantir.docker'
17
22
18
23
group = ' com.streaming'
19
24
version = ' 0.0.1-SNAPSHOT'
20
25
sourceCompatibility = 1.8
21
26
22
27
repositories {
23
- mavenCentral()
28
+ mavenCentral()
24
29
}
25
30
26
-
27
31
dependencies {
28
- compile(' org.springframework.boot:spring-boot-starter-data-jpa' )
29
- compile(' org.springframework.boot:spring-boot-starter-security' )
30
- compile(' org.springframework.boot:spring-boot-starter-web' )
31
- compile(" com.auth0:java-jwt:3.4.0" )
32
- compile (" io.springfox:springfox-swagger2:2.9.2" )
33
- compile (" io.springfox:springfox-swagger-ui:2.9.2" )
34
- compile (" io.springfox:springfox-spring-web:2.9.2" )
35
- runtime(' mysql:mysql-connector-java' )
36
- testCompile(' org.springframework.boot:spring-boot-starter-test' )
32
+ compile(' org.springframework.boot:spring-boot-starter-data-jpa' )
33
+ compile(' org.springframework.boot:spring-boot-starter-security' )
34
+ compile(' org.springframework.boot:spring-boot-starter-web' )
35
+ compile(" com.auth0:java-jwt:3.4.0" )
36
+ compile (" io.springfox:springfox-swagger2:2.9.2" )
37
+ compile (" io.springfox:springfox-swagger-ui:2.9.2" )
38
+ compile (" io.springfox:springfox-spring-web:2.9.2" )
39
+ runtime(' mysql:mysql-connector-java' )
40
+ testCompile(' org.springframework.boot:spring-boot-starter-test' )
37
41
}
42
+
43
+ docker {
44
+ dependsOn build
45
+ name " ${ project.group} /${ bootJar.baseName} "
46
+ files bootJar. archivePath
47
+ buildArgs([' JAR_FILE' : " ${ bootJar.archiveName} " ])
48
+ }
0 commit comments