Skip to content

Gradle: Run the clean task before anything else to make sure nothing is cached. #2705

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 2 commits into from
Nov 21, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,10 @@ def _build_package(self, args, package_type):
else:
raise BuildInterruptingException(
"Unknown build mode {} for apk()".format(args.build_mode))
output = shprint(gradlew, gradle_task, _tail=20,

# WARNING: We should make sure to clean the build directory before building.
# Looks like our private.tar is causing issues to gradle.
output = shprint(gradlew, "clean", gradle_task, _tail=20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice findings and fix 💪
Do you think we should reference this pull request or initial bug report with a refs #2705 in the comment since you explained it all well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was waiting to split the original issue, into multiple chunks (as actually contains multiple issues, and some of them are still being triaged) and then totally forgot to add a reference.

So, I guess that now that we have a PR to reference, I will reference the PR. 👍

_critical=True, _env=env)
return output, build_args

Expand Down