-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
88 lines (75 loc) · 2.96 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
description = "ModelingExample"
group = 'com.revelfire.example'
version = 'git rev-parse HEAD'.execute().text.trim()
buildscript {
ext {
springBootVersion = '1.3.1.RELEASE'
springloadedVersion = '1.2.5.RELEASE'
branch = 'git remote'.execute().text.trim() + "/" + 'git symbolic-ref --short HEAD'.execute().text.trim()
}
repositories {
mavenCentral()
maven { url 'http://repo.spring.io/libs-release' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.springframework:springloaded:${springloadedVersion}")
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'spring-boot'
mainClassName = "com.capitalone.nsb.offers.Application"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// handles resource filtering (placeholder replacement)
processResources {
filesMatching("**/*.properties") {
expand(project.properties)
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url "http://repo.maven.apache.org/maven2" }
maven.url "http://repo.spring.io/snapshot"
maven.url "http://repo.spring.io/milestone"
}
dependencies {
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springBootVersion
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-consul-config', version: '1.0.0.M2'
compile group: 'org.springframework.cloud', name: 'spring-cloud-consul-discovery', version: '1.0.0.M2'
compile 'commons-lang:commons-lang:2.6' // consul discovery depends on this version of commons, do not upgrade
compile 'joda-time:joda-time:2.9.1'
compile 'org.hsqldb:hsqldb:2.3.3'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.0'
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('mysql:mysql-connector-java:5.1.38')
compile('mysql:mysql-connector-java:5.1.38')
testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: springBootVersion) {
exclude(module: 'commons-logging')
}
testCompile group: 'junit', name: 'junit', version:'4.12'
}
tasks.withType(org.springframework.boot.gradle.run.BootRunTask) {
systemProperties = System.properties
}
jar {
baseName = "accounts"
version = ""
}
test {
useJUnit()
// include "**/*Test.class"
systemProperty ('database.url', 'jdbc:mysql://localhost/model_test?useUnicode=true&characterEncoding=utf-8')
systemProperty ('database.driverClassName', 'org.gjt.mm.mysql.Driver')
systemProperty ('database.username', 'root')
systemProperty ('database.password', '')
systemProperty ('database.hibernate.hbm2ddl.auto', 'create-drop')
}
task wrapper(type: Wrapper) {
gradleVersion = '2.5'
}