forked from RBMHTechnology/apidoc-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
91 lines (73 loc) · 2.55 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
// build.gradle
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
// --------------------------------------------------------------------------------------
// Spring Boot Gradle Plugin
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}
apply plugin: 'spring-boot'
// --------------------------------------------------------------------------------------
// Project Configuration
// Java Settings
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
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-$javaVersion"
}
}
repositories {
jcenter()
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
compile "org.springframework.boot:spring-boot-starter-thymeleaf:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"
compile "org.apache.httpcomponents:httpclient:$httpClientVersion"
compile "com.google.guava:guava:$guavaVersion"
}
// --------------------------------------------------------------------------------------
// Gradle Tasks
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
task sourcesJar(type: Jar, dependsOn: classes, description: 'Builds a sources jar artifact suitable for maven deployment.') {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc, description: 'Builds a javadoc jar artifact suitable for maven deployment.') {
classifier = 'javadoc'
from javadoc.destinationDir
}
task testJar(type: Jar, dependsOn: testClasses, description: 'Builds a tests jar artifact suitable for maven deployment.') {
classifier = 'tests'
from sourceSets.test.output
}
// customizing the Manifest
tasks.withType(Jar) {
manifest {
attributes 'Implementation-Title': project.name
attributes 'Implementation-Version': project.version
attributes 'Implementation-Vendor': "Red Bull Media House GmbH"
attributes 'Build-Date': new Date().format("yyyy-MM-dd HH:mm:ss")
}
}
bootRun{
if (project.hasProperty('applicationProperties')){
systemProperty 'spring.config.location', "file:${applicationProperties}"
}
}
run{
if (project.hasProperty('applicationProperties')){
systemProperty 'spring.config.location', "file:${applicationProperties}"
}
}