-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
61 lines (53 loc) · 2.26 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
buildscript {
ext {
springBootVersion = '2.1.7.RELEASE'
}
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/libs-milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE")
classpath('com.palantir.gradle.docker:gradle-docker:0.20.0')
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.palantir.docker'
group = 'com.yourproject'
version = '1.2.3'
sourceCompatibility = 1.10
repositories {
// All GA releases (i.e. versions ending in .RELEASE) are deployed to Maven Central, so using the mavenCentral() repository is sufficient for GA releases.
mavenCentral()
// this is necessary for building snapshot version
maven { url "https://repo.spring.io/snapshot" }
// this is necessary if you are using a milestone or release candidate version, you will need to ensure you have the Spring Milestone repository defined as shown below
maven { url "https://repo.spring.io/milestone" }
maven { url "https://repo.spring.io/libs-milestone" }
}
bootRun {
jvmArgs = ["--add-modules", "java.xml.bind"] //, "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=32323"]
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-security")
compile('org.springframework.security.oauth:spring-security-oauth2:2.3.0.RELEASE')
compile('org.springframework.security:spring-security-jwt:1.0.9.RELEASE')
compile('org.springframework.boot:spring-boot-starter-actuator')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
}
docker {
dependsOn build
name "your-docker-repo/${bootJar.baseName}"
files bootJar.archivePath
buildArgs(['JAR_FILE': "${bootJar.archiveName}"])
}