Yuvaraj B V
Yuvaraj B V

Reputation: 1

gradle build is failing

my gradle build is failing after upgrading gradle from 5.6 to 8.3

below are the error details.

FAILURE: Build failed with an exception.

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 6s

below is my build file.

plugins {
    id 'com.moowork.node' version '1.3.1'
    id 'war'
}

jar.enabled = false
apply plugin: 'war'

npmInstall {
    def registry = "--registry=" + REPO_ROOT_URL
    registry = registry.contains("repo.") ? registry + "/api/npm/csf-npm-delivered" : registry + "/csf-npm-delivered"
    args = ['--no-optional', registry]
}

task npmRunBuild {
    doLast {
        copy {
            from 'build'
            into 'dist'
        }
        delete 'build'
    }
}

war {
    archiveFileName = "smk.smk-configuration.war"

    from(fileTree("dist")) {
        into "/"
    }
    manifest {
        attributes(
                "Include-Resource": "dist",
                "Web-ContextPath": "/gui/nsmk/",
                "Bundle-SymbolicName": "smk.smk-configuration",
                "Bundle-Name": "smk.smk-configuration"
        )
    }

    classpath = classpath.filter { file ->
        !file.name.endsWith('jar')
    }
}

clean {
    doLast {
        delete 'dist'
    }
}

processResources.dependsOn npmInstall
war.dependsOn npmRunBuild

Upvotes: 0

Views: 230

Answers (1)

Simon Jacobs
Simon Jacobs

Reputation: 6608

The plugin com.moowork.node is not being developed anymore and is not compatible with recent versions of Gradle. There is an open GitHub issue from 2022 saying it's not compatible with Gradle 7.1.

It looks like you are going to have to fork the repository and fix the issue yourself, or find another solution to the problem the plugin solves for you.

Upvotes: 0

Related Questions