-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
84 lines (66 loc) · 2.32 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
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.1.3.RELEASE"
}
}
plugins {
id "com.wiredforcode.spawn" version "0.8.2"
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
bootJar {
baseName = 'refund-backend'
}
repositories {
mavenCentral()
jcenter()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
def props = new Properties()
file("src/main/resources/application.properties").withInputStream { props.load(it) }
def ssh_host = props.getProperty("ssh.host")
def ssh_port = props.getProperty("ssh.port")
def ssh_user = props.getProperty("ssh.user")
def ssh_pass = props.getProperty('ssh.pass')
task startSSHTunnel(type: SpawnProcessTask) {
command "sshpass -p ${ssh_pass} ssh -v -oConnectTimeout=30 -oStrictHostKeyChecking=no -l ${ssh_user} -L${ssh_port}:localhost:${ssh_port} ${ssh_user}@${ssh_host}"
ready 'Authentication succeeded'
}
task stopSSHTunnel(type: KillProcessTask)
task sshWrapper(dependsOn: ['startSSHTunnel'], type: Test) {
systemProperty "service..endpoint", "localhost:${ssh_port}"
}
bootRun.dependsOn sshWrapper
bootRun.finalizedBy stopSSHTunnel
dependencies {
compile "org.springframework.boot:spring-boot-starter-web"
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile "at.favre.lib:bcrypt:0.7.0"
compile 'mysql:mysql-connector-java'
compile 'javax.xml.bind:jaxb-api'
compile 'org.springframework.boot:spring-boot-starter-test'
compile 'io.springfox:springfox-swagger2:2.9.2'
compile 'io.jsonwebtoken:jjwt-api:0.10.5'
runtime 'io.jsonwebtoken:jjwt-impl:0.10.5'
runtime 'org.bouncycastle:bcprov-jdk15on:1.60'
runtime 'io.jsonwebtoken:jjwt-jackson:0.10.5'
testCompile 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
compile 'org.dmfs:oauth2-essentials:0.10'
compile 'org.dmfs:httpurlconnection-executor:0.16.2'
compile 'com.mashape.unirest:unirest-java:1.4.9'
compile 'com.google.guava:guava:27.0.1-jre'
implementation 'com.sendgrid:sendgrid-java:4.3.0'
}