// --- 1. Environment & Variable Setup ---
def jh = System.getenv('JAVA_HOME') ?: System.getProperty('java.home')
if (!jh) {
throw new GradleException("JAVA_HOME environment variable not set.")
}
// Define toolsJarFile early so it's available to your instanceClasspath later
def toolsJarFile = []
if (JavaVersion.current().isJava8()) {
def sj = file("${jh}/lib/tools.jar")
if (!sj.exists()) sj = file("${jh}/../lib/tools.jar")
if (sj.exists()) toolsJarFile = sj
}
// --- 2. Plugin & Application Configuration ---
if (!project.plugins.hasPlugin('application')) {
apply plugin: 'application'
}
application {
mainClass.set("comet.agent.UniversalAttacher")
}
// Disable default app tasks to prevent conflicts with COMET/CPLS packaging
tasks.distZip.enabled = false
tasks.distTar.enabled = false
tasks.startScripts.enabled = false
// Satisfy legacy property lookups
project.ext.mainClassName = "comet.agent.UniversalAttacher"
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)