This repository has been archived by the owner on May 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathbuild.gradle
112 lines (96 loc) · 4.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
wrapper {
gradleVersion = '4.5.1'
distributionType = Wrapper.DistributionType.ALL
}
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.10.RELEASE'
classpath 'com.ofg:uptodate-gradle-plugin:1.6.3'
classpath 'se.transmode.gradle:gradle-docker:1.2'
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:${springCloudContractVersion}"
classpath 'com.blogspot.toomuchcoding:gradle-test-profiler:0.3.1'
classpath 'gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:1.4.20'
if (project.hasProperty('coverage')) {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.1'
}
}
}
apply plugin: 'groovy'
apply plugin: 'org.springframework.boot'
ext['selenium.version'] = seleniumVersion
group = mavenProjectGroupId
version = findProperty('currentVersion') ?: 'LOCAL'
sourceCompatibility = '1.8'
apply from: 'gradle/cli.gradle'
apply from: 'gradle/test.gradle'
apply from: 'gradle/misc.gradle'
apply from: 'gradle/release.gradle'
apply from: 'gradle/contracts.gradle'
repositories {
mavenLocal()
jcenter()
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework:spring-context-support'
compile 'org.codehaus.groovy:groovy-all'
compile 'com.fasterxml.jackson.core:jackson-databind'
compile 'com.google.guava:guava:20.0'
compile 'org.apache.commons:commons-lang3:3.7'
compile 'org.apache.tomcat.embed:tomcat-embed-el'
compile 'com.jayway.jsonpath:json-path-assert:2.4.0'
compile 'org.yaml:snakeyaml'
compile 'org.hibernate:hibernate-validator'
compile 'org.aspectj:aspectjrt'
compile 'org.codehaus.gpars:gpars:1.2.1'
compile 'net.sf.ehcache:ehcache'
compile "com.ofg:micro-infra-spring-boot-starter:${microInfraSpringVersion}"
compile "com.ofg:activity-tracker-boot-starter:${microInfraSpringVersion}"
runtime 'cglib:cglib-nodep:3.2.6'
runtime 'org.objenesis:objenesis:2.6'
runtime 'org.aspectj:aspectjweaver'
runtime 'com.h2database:h2'
testCompile 'org.awaitility:awaitility:3.0.0'
testCompile 'org.springframework.boot:spring-boot-starter-test'
testCompile "com.ofg:micro-infra-spring-test:${microInfraSpringVersion}"
testCompile "org.gebish:geb-core:${gebVersion}"
testCompile "org.gebish:geb-spock:${gebVersion}"
testCompile 'org.spockframework:spock-spring'
testCompile "org.seleniumhq.selenium:selenium-firefox-driver:${seleniumVersion}"
testCompile "org.seleniumhq.selenium:selenium-chrome-driver:${seleniumVersion}"
testCompile "org.seleniumhq.selenium:selenium-support:${seleniumVersion}"
testCompile "io.rest-assured:rest-assured:${restAssuredVersion}"
testCompile "io.rest-assured:spring-mock-mvc:${restAssuredVersion}"
// for easier contract development - ide auto-completion support
testCompileOnly "org.springframework.cloud:spring-cloud-starter-contract-verifier:${springCloudContractVersion}"
}
bootRun {
description = "Starts application with dev profile, use task rule 'bootRun<Profiles>' to change profile"
systemProperty 'CONFIG_FOLDER', environment['CONFIG_FOLDER']
systemProperty 'APP_ENV', environment['APP_ENV'] ?: 'dev'
systemProperty 'server.port', findProperty('server.port') ?: defaultApplicationPort
systemProperty 'spring.profiles.active', findProperty('spring.profiles.active') ?: 'dev,springCloud'
systemProperties System.properties as Map<String, ?> // Allows to pass command-line properties (using -D switch)
doFirst {
if (!systemProperties['CONFIG_FOLDER']) {
logger.error('CONFIG_FOLDER system variable not defined. Please set it in the system or pass via -D switch.')
}
}
}
tasks.addRule("Pattern: bootRun<Profiles>: Starts application with given comma separated profiles, eg. 'bootRunProd', 'bootRunProd,smokeTests'") { String taskName ->
if (taskName.startsWith('bootRun')) {
task(taskName) {
bootRun.systemProperty 'spring.profiles.active', (taskName - 'bootRun').uncapitalize()
finalizedBy bootRun
}
}
}