DEV Community

Query Filter
Query Filter

Posted on

bridge18

// Ensure Shadow's internal requirements are met without breaking Gradle 7.2
if (!project.plugins.hasPlugin('application')) {
    apply plugin: 'application'
}

// Satisfy the 'mainClass' provider that Shadow 7.1.2 queries
application {
    mainClass.set("comet.agent.UniversalAttacher")
}

// Disable the default distribution tasks created by the application plugin
// This prevents conflicts with your custom COMET/CPLS packaging
tasks.distZip.enabled = false
tasks.distTar.enabled = false
tasks.startScripts.enabled = false

// Fix for Line 204: Define toolsJarFile specifically for Java 8
def jh = System.getenv('JAVA_HOME') ?: System.getProperty('java.home')
def toolsJarFile = []
if (JavaVersion.current().isJava8()) {
    def toolsJar = file("${jh}/lib/tools.jar")
    if (!toolsJar.exists()) toolsJar = file("${jh}/../lib/tools.jar")
    if (toolsJar.exists()) toolsJarFile = toolsJar
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)