-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
105 lines (87 loc) · 2.88 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
import org.gradle.api.tasks.wrapper.Wrapper.DistributionType
buildscript {
ext {
gradleGitVersion = '1.4.21'
springBootVersion = '2.0.0.RELEASE'
propDepsVersion = '0.0.9.RELEASE'
}
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'http://repo.spring.io/plugins-release' }
mavenCentral()
}
dependencies {
classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:${gradleGitVersion}"
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:propdeps-plugin:${propDepsVersion}"
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
mavenLocal()
maven { url "https://jitpack.io" }
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
apply plugin: 'idea'
group = 'com.fredboat.bridge'
}
subprojects {
apply plugin: 'java'
apply plugin: 'propdeps'
apply plugin: 'propdeps-idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
sourceCompatibility = 1.8
targetCompatibility = 1.8
ext {
springCloudVersion = 'Finchley.M8'
}
dependencies {
testCompile('org.springframework.boot:spring-boot-starter-test')
optional "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion"
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
compileJava.dependsOn 'clean'
compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
//required by spring boot configuration processor
compileJava.dependsOn(processResources)
bootRun {
//compiling tests during bootRun increases the likelyhood of catching broken tests locally instead of on the CI
dependsOn compileTestJava
//pass in custom jvm args
// source: https://stackoverflow.com/a/25079415
// example: ./gradlew bootRun -PjvmArgs="--illegal-access=debug -Dwhatever=value"
if (project.hasProperty('jvmArgs')) {
jvmArgs project.jvmArgs.split('\\s+')
}
}
bootJar {
archiveName = project.name + '.jar'
doLast {
//copies the jar into a place where the Dockerfile can find it easily (and users maybe too)
copy {
from 'build/libs/' + project.name + '.jar'
into '.'
}
}
}
}
version = '1.0'
ext {
moduleName = 'Bridge'
}
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
distributionType = DistributionType.ALL
}