-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
113 lines (90 loc) · 2.78 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
106
107
108
109
110
111
112
113
apply plugin: 'java'
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.7.RELEASE")
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
apply plugin: 'org.springframework.boot'
apply plugin: 'com.github.johnrengelman.shadow'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
main
api
sample
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.16.18'
apiCompileOnly 'org.projectlombok:lombok:1.16.18'
sampleCompileOnly 'org.projectlombok:lombok:1.16.18'
compile sourceSets.api.output
sampleCompile sourceSets.api.output
sampleCompile('org.springframework.boot:spring-boot-starter-web')
compile group: 'org.ow2.asm', name: 'asm', version: '5.2'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile group: 'org.javassist', name: 'javassist', version: '3.21.0-GA'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.9.1'
testCompile "junit:junit:4.11"
}
jar {
archiveName = "${rootProject.name}-${rootProject.version}.jar"
manifest {
attributes(
'Premain-Class': 'se.tardell.simon.bajs.BajsAgent',
'Can-Redefine-Classes': 'true',
'Can-Retransform-Classes': 'true',
'Can-Set-Native-Method-Prefix': 'true',
'Implementation-Title': "BAJS",
'Implementation-Version': rootProject.version
)
}
}
task apiJar(type: Jar) {
from sourceSets.api.output
baseName 'bajs-api'
}
task rtCompile(type: JavaExec, dependsOn: compileJava){
main 'se.tardell.simon.bajs.TaintFieldAdder'
classpath sourceSets.main.runtimeClasspath
}
task rtJar(type: Jar, dependsOn: rtCompile){
from 'build/taint'
baseName 'bajs-rt'
}
task sampleJar(type: Jar){
from sourceSets.sample.output
baseName 'bajs-sample'
}
bootRepackage {
withJarTask = sampleJar
classifier 'boot'
mainClass 'se.tardell.simon.bajs.sample.Sample'
customConfiguration = 'sampleRuntime'
}
task sampleShadow(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar){
classifier = 'sample'
from sourceSets.sample.output
configurations = [project.configurations.sampleRuntime]
manifest {
attributes 'Main-Class': 'se.tardell.simon.bajs.sample.Test'
}
}
shadowJar {
classifier 'agent'
}
artifacts{
archives rtJar
archives apiJar
archives sampleShadow
archives shadowJar
}