forked from vmware-archive/spring-boot-cities
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
92 lines (80 loc) · 2.56 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
buildscript {
ext {
springBootVersion = '2.2.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('se.transmode.gradle:gradle-docker:1.2')
}
}
plugins {
id 'org.springframework.boot' version '2.2.2.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
group = 'sufyaankazi'
//apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
//apply plugin: 'org.springframework.boot'
apply plugin: 'docker'
jar {
archiveBaseName = 'cities-rest'
}
repositories {
mavenCentral()
}
allprojects {
if (project.hasProperty('buildversion')) {
project.version = project.buildversion
} else {
project.version = '1.0'
}
}
dependencies {
//testImplementation('org.springframework.boot:spring-boot-starter-web')
// https://mvnrepository.com/artifact/org.springframework/spring-web
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
//testImplementation group: 'org.springframework', name: 'spring-web', version: '5.2.6.RELEASE'
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-rest")
implementation 'org.springframework.cloud:spring-cloud-spring-service-connector'
implementation 'org.springframework.cloud:spring-cloud-cloudfoundry-connector'
//runtime("org.hsqldb:hsqldb")
implementation('com.h2database:h2')
//runtime("mysql:mysql-connector-java")
runtimeOnly("org.flywaydb:flyway-core")
testImplementation('junit:junit:4.13')
}
eclipse {
classpath {
containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
}
}
task buildDocker(type: Docker, dependsOn: build) {
push = false
applicationName = jar.archiveBaseName
dockerfile = file('src/main/docker/Dockerfile')
doFirst {
copy {
from jar
into stageDir
}
}
}
test {
useJUnitPlatform()
maxParallelForks = 2
testLogging {
events "passed", "skipped", "failed", "standardError"
//events "passed", "skipped", "failed", "standardOut", "standardError"
}
}