-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (57 loc) · 2.07 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
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'com.bmuschko:gradle-docker-plugin:2.6.5'
}
repositories {
jcenter()
}
}
apply plugin: 'spring-boot'
apply plugin: 'groovy'
apply plugin: 'application'
apply plugin: 'com.bmuschko.docker-java-application'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
}
uploadArchives {
repositories {
//this would normally be your team's Artifactory, Nexus repository, etc.
flatDir {
dirs "/tmp/repo"
}
}
}
dependencies {
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}", {
exclude module: "spring-boot-starter-tomcat"
}
compile "org.springframework.boot:spring-boot-starter-jetty:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"
testCompile "org.spockframework:spock-core:${spockVersion}"
testCompile "org.spockframework:spock-spring:${spockVersion}"
testCompile "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
testCompile 'junit:junit:4.12'
testRuntime "cglib:cglib-nodep:3.1" // allows mocking of classes (in addition to interfaces)
testRuntime "org.objenesis:objenesis:2.1" // allows mocking of classes without default constructor (together with CGLIB)
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
filter(ReplaceTokens, tokens: [appVersion: project.version])
}
/* Uncomment to enable building a Docker image as part of the build
docker {
url = "${System.env.DOCKER_HOST}".replaceFirst('tcp','https')
// certPath = new File(System.properties['user.home'], '.docker/machine/machines/default')
javaApplication {
baseImage = 'java:8'
maintainer = 'David Norton "david.norton@objectpartners.com"'
port = 8080
tag = "${name}:${version}"
}
}
assemble.dependsOn dockerBuildImage
*/