-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
47 lines (41 loc) · 1.18 KB
/
build.gradle.kts
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
plugins {
`java-library`
id("com.github.johnrengelman.shadow") version "7.1.2"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
implementation("org.javassist:javassist:3.28.0-GA")
compileOnly("org.projectlombok:lombok:1.18.24")
annotationProcessor("org.projectlombok:lombok:1.18.22")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.shadowJar {
manifest {
attributes(
"Manifest-Version" to "1.0",
"Main-Class" to "me.txmc.instexample.Main",
"Premain-Class" to "me.txmc.instexample.jagent.AgentMain",
"Agent-Class" to "me.txmc.instexample.jagent.AgentMain",
"Can-Redefine-Classes" to "true",
"Can-Retransform-Classes" to "true",
"Can-Set-Native-Method-Prefix" to "true"
)
}
}
group = "me.txmc"
version = "1.0-SNAPSHOT"
description = "An example of how to do self attach instrumentation in java 9+"
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}