-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
78 lines (62 loc) · 2.13 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
import mocklab.build.GithubReleasePublishTask
import mocklab.build.HerokuFatJarDeployTask
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id "net.foragerr.jmeter" version "1.1.0-4.0"
}
group = 'io.mocklab'
version = '1'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.SR1")
}
dependencies {
compile 'org.springframework.boot:spring-boot-starter-oauth2-client'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-mustache'
compile "org.springframework.boot:spring-boot-devtools"
compile 'org.apache.httpcomponents:httpclient:4.5.13'
compile 'com.paypal.sdk:rest-api-sdk:+'
compile 'com.google.guava:guava:31.0.1-jre'
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.seleniumhq.selenium:selenium-api")
testCompile 'org.seleniumhq.selenium:selenium-chrome-driver'
testCompile('com.github.tomakehurst:wiremock-jre8:2.32.0')
testCompile("junit:junit")
testCompile('org.assertj:assertj-core:3.22.0')
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
bootJar {
archiveName = 'mocklab-demo-app.jar'
}
def tag = System.getenv('CIRCLE_SHA1') ? "circle-${System.getenv('CIRCLE_BRANCH')}-${System.getenv('CIRCLE_SHA1')}" :
(System.getenv('TAG') ?: "${InetAddress.localHost.hostName}-${System.currentTimeMillis()}")
def REPO_NAME = 'mocklab-demo-app'
task pushToGithub(type: GithubReleasePublishTask) {
repoOwner 'mocklab'
repository REPO_NAME
tagName tag
attachmentFilePath "${project.buildDir}/libs/mocklab-demo-app.jar"
}
task herokuDeploy(type: HerokuFatJarDeployTask) {
repoOwner 'mocklab'
repository REPO_NAME
tagName tag
herokuApp "mocklab-demo"
}
task buildAndDeploy {
dependsOn clean, herokuDeploy, pushToGithub
}
pushToGithub.mustRunAfter assemble
herokuDeploy.mustRunAfter pushToGithub