forked from elastest/elastest-platform-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
127 lines (101 loc) · 4.47 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
115
116
117
118
119
120
121
122
123
124
125
126
127
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.4.RELEASE")
classpath "se.transmode.gradle:gradle-docker:1.2"
}
}
plugins {
id "nebula.os-package" version "2.2.6"
id 'com.github.sherter.google-java-format' version '0.6'
}
group 'io.elastest.epm'
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'docker'
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
project.ext {
/**
* Application Related Version
*/
springVersion = '4.3.9.RELEASE'
springBootVersion = '1.5.4.RELEASE'
springFoxVersion = '2.7.0'
/**
* Application Related Version
*/
applicationDate = new Date()
applicationVersion = version
applicationVersionDebian = "1";
applicationVersionFull = "${applicationVersion}"
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-websocket', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion
// https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa
compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.11.4.RELEASE'
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
// https://mvnrepository.com/artifact/org.hsqldb/hsqldb
compile group: 'org.hsqldb', name: 'hsqldb', version: '2.3.2'
// compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.0.3'
compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '1.6.2'
compile 'com.google.code.gson:gson:2.8.0'
// https://mvnrepository.com/artifact/io.springfox/springfox-swagger2
compile group: 'io.springfox', name: 'springfox-swagger2', version: springFoxVersion
// https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
compile group: 'io.springfox', name: 'springfox-swagger-ui', version: springFoxVersion
// https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa
compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.11.4.RELEASE'
// https://mvnrepository.com/artifact/joda-time/joda-time
compile group: 'joda-time', name: 'joda-time', version: '2.9.9'
// https://mvnrepository.com/artifact/com.github.docker-java/docker-java
compile group: 'com.github.docker-java', name: 'docker-java', version: '3.0.12'
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
compile group: 'org.yaml', name: 'snakeyaml', version: '1.17'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.9.0'
// https://mvnrepository.com/artifact/org.kamranzafar/jtar
compile group: 'org.kamranzafar', name: 'jtar', version: '2.3'
// https://mvnrepository.com/artifact/org.mockito/mockito-all
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19'
// https://mvnrepository.com/artifact/org.springframework/spring-test
testCompile group: 'org.springframework', name: 'spring-test', version: '4.3.9.RELEASE'
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.powermock/powermock-mockito-release-full
testCompile group: 'org.powermock', name: 'powermock-mockito-release-full', version: '1.6.4'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test
testCompile group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: '1.5.4.RELEASE'
}
bootRepackage {
mainClass = 'io.elastest.epm.main.Application'
}
task buildDocker(type: Docker) {
dockerfile = 'docker/elastest-platform-manager/Dockerfile'
addFile {
from jar
}
tag = 'elastest/elastest-platform-manager'
}
task buildDockerFromScratch(type: Docker) {
baseImage = 'openjdk:8-jre-alpine'
push = project.hasProperty('push')
tag = 'elastest/elastest-platform-manager'
addFile {
from jar
rename {'epm.jar'}
}
entryPoint(['java', '-jar', '/epm.jar'])
exposePort(8180)
}
buildDocker.dependsOn(build)
compileJava.dependsOn tasks.googleJavaFormat