shadowJar {
dependsOn buildAgent, compileAttacher
group = "Distribution"
description = "Builds the universal attacher + agent suite"
// Explicitly set the name to avoid 'mainClassName' property resolution issues
archiveBaseName.set('profiler-all-in-one')
archiveClassifier.set('all')
// REUSE: Pull classes from your existing agent and the new attacher
from compileAgent.destinationDirectory
from compileAttacher.destinationDirectory
// This block satisfies the 'mainClass' requirement manually
manifest {
attributes(
'Main-Class': 'comet.agent.UniversalAttacher',
'Premain-Class': 'comet.agent.ProfilerAgent',
'Agent-Class': 'comet.agent.ProfilerAgent',
'Can-Redefine-Classes': 'true',
'Can-Retransform-Classes': 'true'
)
}
// Merge dependencies (ByteBuddy)
configurations = [project.configurations.runtimeClasspath]
// Relocate to avoid conflicts in CPLS/COMET
relocate 'net.bytebuddy', 'comet.shaded.bytebuddy'
}
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)