-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
90 lines (69 loc) · 2.3 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
buildscript {
ext {
springBootVersion = '2.2.10.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
plugins {
id 'com.palantir.git-version' version '0.12.3'
}
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'com.palantir.git-version'
def details = versionDetails()
mainClassName = "com.rookout.tutorial.TutorialApplication"
group = 'com.rookout'
version = '1.0.0'
sourceCompatibility = 8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
// Specific dependencies for fixing different vulnerabilities
compile("org.hibernate.validator:hibernate-validator:6.1.3.Final")
compile("org.springframework:spring-webmvc:5.2.9.RELEASE")
compile("org.springframework:spring-web:5.2.9.RELEASE")
compile("org.apache.tomcat.embed:tomcat-embed-core:9.0.40")
compile("ch.qos.logback:logback-classic:1.2.3")
compile("org.slf4j:slf4j-api:1.7.30")
compile("org.yaml:snakeyaml:1.26")
// tracing support
compile group: 'io.opentracing.contrib', name: 'opentracing-spring-jaeger-web-starter', version: '3.3.1'
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
}
class Download extends DefaultTask {
@Input
String sourceUrl
@OutputFile
File target
@TaskAction
void download() {
ant.get(src: sourceUrl, dest: target)
}
}
task downloadRookout(type: Download) {
sourceUrl = "https://oss.sonatype.org/service/local/repositories/releases/content/com/rookout/rook/0.1.263/rook-0.1.263.jar"
target = new File('rook.jar')
}
// bootJar is added by spring + java plugin, it creates a fat jar, we add the source files
// https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/html/#reacting-to-other-plugins-java
bootJar {
manifest {
attributes('ROOKOUT_COMMIT': details.gitHashFull)
}
from sourceSets.main.allSource
}
bootJar.dependsOn downloadRookout
run {
jvmArgs += ["-javaagent:rook.jar"]
}