Skip to content

Resolves 'gradlew dist' Errors on execution of command consecutively #688

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

Merged
merged 3 commits into from
Apr 25, 2022
Merged

Resolves 'gradlew dist' Errors on execution of command consecutively #688

merged 3 commits into from
Apr 25, 2022

Conversation

rupeshkumar22
Copy link
Contributor

@rupeshkumar22 rupeshkumar22 commented Apr 25, 2022

Fixes #687

Resolves both gradlew dist and gradlew build Errors on executing the command one by one.

Why the issue arises?
Because core.jar, vr.jar, etc. files are not getting generated because the Jar tasks are getting skipped. The reason for skipping of jar task is because it is UP-TO-DATE or the source files are not getting changed. This can be identified by gradlew dist -info which says the Jar task is skipped(while executing the command again without modifying the source files)

When executing gradlew dist -info for the first time it shows the following-

> Task :core:jar
Caching disabled for task ':core:jar' because:
  Build cache is disabled
Task ':core:jar' is not up-to-date because:
  Output property 'archiveFile' file *\processing-android-android-0402-v4.5.0a3\core\build\libs\core.jar 
has been removed.
*\processing-android-android-0402-v4.5.0a3\core\build\libs\core.jar
(Thread[Execution worker for ':',5,main]) completed. Took 0.396 secs.
:core:sourceJar (Thread[Execution worker for ':',5,main]) started.

Executing the same command for the second time without changing the source files shows the following-

> Task :core:jar UP-TO-DATE
Caching disabled for task ':core:jar' because:
  Build cache is disabled
Skipping task ':core:jar' as it is up-to-date.
:core:jar (Thread[Execution worker for ':',5,main]) completed. Took 0.001 secs.
:core:sourceJar (Thread[Execution worker for ':',5,main]) started.

This issue is the same for the libraries AR and VR.

Solution with this PR
This PR applies 'if conditions' to check the existence of necessary files i.e core.jar, vr.jar, etc. Do the copy/move operations if files exist otherwise no need to copy or move the files as we know the files do not exist and processing-core.jar, ar.jar, etc. are already UP-TO-DATE(jar task get skipped in this case).

@codeanticode codeanticode merged commit 4310249 into processing:master Apr 25, 2022
@codeanticode
Copy link
Contributor

Cool, thanks!

@rupeshkumar22
Copy link
Contributor Author

Thanks for the review! @codeanticode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build Error when using 'gradlew dist' more than once consecutively
2 participants