Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please review your inputs and outputs, especially with multiple target platforms #104

Open
Vampire opened this issue Oct 28, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Vampire
Copy link

Vampire commented Oct 28, 2021

I've found at least two places where changing / deleting the output did not make the task out-of-date or changing an input did not make the task out-of-date.

Please review the input and output annotations as this leads to unreliable builds and also prevents from ever being able to make any of the tasks cacheable. And it also make it harder to use the tasks as input for other tasks.

The one places over which I stumbled where, that the runtimeZip task does always declare the non-targetPlatforms file as output and never the targetPlatform specific ones. This for example caused that the task was up-to-date even after I deleted the output files and that tasks.githubPublish { from(tasks.runtimeZip) } caused the artifacts to be built, but not uploaded until I added the outputs via the runtime API.

The other place was, that changing the runInBinDir property did not make the startScripts task out of date. After changing it to true, rebuilding and testing, the behavior didn't change and I first had to find out that it is the normal startScripts task of the application plugin you use to fix that up.

@hakanai hakanai added the bug Something isn't working label Jan 15, 2023
@gotson
Copy link

gotson commented Aug 2, 2023

changing the runtime.modules will not mark the runtime task outdated either.

@dsilvasc
Copy link

Here's a workaround for the case @gotson mentioned:

// Workaround for https://github.com/beryx/badass-runtime-plugin/issues/104
// The jre task correctly re-runs when we update the list of modules to include,
// but the runtime task incorrectly remains up-to-date.
tasks.named("runtime").configure {
  inputs.files(tasks.named("jre"))
}

@TheoLassonder
Copy link

@dsilvasc Thanks for the work around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants