Reputation: 1
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.
In plugin 'com.moowork.node' type 'com.moowork.gradle.node.npm.NpmSetupTask' setter 'setArgs()' should not be annotated with: @Internal.
Reason: Input/Output annotations are ignored if they are placed on something else than a getter.
Possible solutions: 1. Remove the annotations. 2. Rename the method.
For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#ignored_annotations_on_method in the Gradle documentation.
In plugin 'com.moowork.node' type 'com.moowork.gradle.node.npm.NpmSetupTask' property 'args' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#missing_annotation in the Gradle documentation.
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
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