41 lines
892 B
Groovy
41 lines
892 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
}
|
|
|
|
group = 'com.yourdomain'
|
|
version = '1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation platform('org.junit:junit-bom:5.10.0')
|
|
testImplementation 'org.junit.jupiter:junit-jupiter'
|
|
implementation 'net.bytebuddy:byte-buddy:1.14.10'
|
|
implementation 'net.bytebuddy:byte-buddy-agent:1.14.10'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Premain-Class': 'com.yourdomain.agent.CheckrpAgent',
|
|
'Can-Redefine-Classes': 'true',
|
|
'Can-Retransform-Classes': 'true'
|
|
)
|
|
}
|
|
}
|
|
|
|
shadowJar {
|
|
archiveBaseName.set('agent')
|
|
archiveClassifier.set('')
|
|
archiveVersion.set('1.0-SNAPSHOT')
|
|
manifest {
|
|
attributes 'Premain-Class': 'com.yourdomain.agent.CheckrpAgent'
|
|
}
|
|
} |