-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
65 lines (53 loc) · 1.42 KB
/
build.gradle.kts
File metadata and controls
65 lines (53 loc) · 1.42 KB
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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
java
id("com.gradleup.shadow") version "9.3.1"
id("com.diffplug.spotless") version "8.2.1"
}
group = "fr.bl.drit.flow"
version = "1.0.0"
repositories {
mavenCentral()
}
dependencies {
implementation("net.bytebuddy:byte-buddy:1.18.5")
implementation("net.bytebuddy:byte-buddy-agent:1.18.5")
implementation("com.fasterxml.jackson.core:jackson-databind:2.15.2")
// For unit tests
testImplementation("org.junit.jupiter:junit-jupiter-api:6.0.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:6.0.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:1.10.3")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
spotless {
java {
googleJavaFormat()
}
}
tasks.named("build") {
dependsOn("spotlessApply")
}
tasks.named<Jar>("jar") {
enabled = false
}
tasks.withType<ShadowJar> {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
archiveVersion.set("")
// Make jar usable as javaagent: set Premain-Class
manifest {
attributes(
"Premain-Class" to "fr.bl.drit.flow.agent.AgentMain",
"Agent-Class" to "fr.bl.drit.flow.agent.AgentMain",
"Can-Redefine-Classes" to "true",
"Can-Retransform-Classes" to "true"
)
}
}