Resolves 'gradlew dist' Errors on execution of command consecutively #688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #687
Resolves both
gradlew dist
andgradlew 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-Executing the same command for the second time without changing the source files shows the following-
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 alreadyUP-TO-DATE
(jar task get skipped in this case).