Hi all, I have a question concerning the up-to-dat...
# general
Hi all, I have a question concerning the up-to-date check from gradle I have a convention plugin that uses the gradle node plugin (it provides the `NpmTask`to inherit from and makes sure the correct version of npm is installed) to trigger the lint script in an angular project:
ng lint
The convention plugin fails when there are linting probs and works fine. However, when running a gradle scan, the scan states that
The task was not up-to-date because it did not have any declared outputs
I defined the inputs on this task (basically all the code in the
folder and the config files) you want to lint, but I was wondering what I should provide as output so gradle can perform its up-to-date check. If the inputs don’t change, the linting will still be ok and should not happen again. The code of the script plugin is below:
Copy code
def lintAngularFrontend = tasks.register("lintAngularFrontend", NpmTask)
lintAngularFrontend.configure {
    group = 'Verification'
    description = 'Runs linting of angular frontend.'

    inputs.files('package.json', 'package-lock.json', 'angular.json', 'tsconfig.json', 'tsconfig.app.json')

    dependsOn npmInstallTask
    args = ['run', 'lint']
Tnx for the help and insights
So you mean you have no output? Or rather the output is "if it did not fail all is well, if it failed, well, it failed"?
Then use
outputs.upToDateWhen { true }
interesting, testing it right away. Tnx (again) Vampire 👌
Always a pleasure