-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
67 lines (53 loc) · 1.97 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
version = '1.0.0'
sourceCompatibility = 1.8
dependencies {
compileOnly 'org.projectlombok:lombok:1.16.18'
compile 'org.springframework.boot:spring-boot-devtools'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-thymeleaf'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
testCompile 'org.springframework.boot:spring-boot-starter-test'
}
//--- Changes to make it work with Codekvast and New Relic
repositories {
jcenter() // Required to find codekvast-agent
}
def codekvastVersion='0.22.1'
def newrelicVersion='3.39.0'
configurations { javaagent }
dependencies {
javaagent "io.codekvast:codekvast-agent:$codekvastVersion"
javaagent "com.newrelic.agent.java:newrelic-agent:$newrelicVersion"
}
bootRepackage {
// Run the app as an ordinary Gradle application instead of an executable Spring Boot jar or else
// Codekvast won't find anything. (It does not yet understand Spring Boot's proprietary nested jar format)
enabled = false
}
apply plugin: 'application'
mainClassName = 'io.codekvast.demo1.CodekvastDemoApplication'
// Download javaagents to a well-known location...
applicationDistribution.from(configurations.javaagent) {
into 'javaagent'
}
def codekvastAgent="build/install/${rootProject.name}/javaagent/codekvast-agent-${codekvastVersion}.jar"
def newrelicAgent="build/install/${rootProject.name}/javaagent/newrelic-agent-${newrelicVersion}.jar"
applicationDefaultJvmArgs = [
"-Xbootclasspath/a:$codekvastAgent",
"-javaagent:$codekvastAgent",
// "-javaagent:$newrelicAgent"
]
// Override the default Gradle buildpack stuff...
task stage(dependsOn: ['clean', 'build', 'installDist'])
build.mustRunAfter clean