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

Fix caching of task bundleJsAndAssets #24331

Closed
wants to merge 1 commit into from

Conversation

SimonSimya
Copy link

@SimonSimya SimonSimya commented Apr 6, 2019

Summary

Fixes #24330

Changelog

[Android] [fixed] - Fixed #24330

Test Plan

  1. Build the app via ./gradlew assembleRelease
  2. Build the app again via ./gradlew assembleRelease without changes
  3. Task bundleReleaseJsAndAssets is UP-TO-DATE

I tested with multiple flavors. It works when cleaning the build before and with all subsequent builds.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@react-native-bot react-native-bot added Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used. No CLA Authors need to sign the CLA before a PR can be reviewed. labels Apr 6, 2019
@dulmandakh
Copy link
Contributor

Could you please add description. Did you tested the change?

@SimonSimya
Copy link
Author

@dulmandakh just edited the description

@dulmandakh
Copy link
Contributor

how do you handle a case where asset is removed or not used anymore?

@SimonSimya
Copy link
Author

If assets are removed or added, gradle will automatically run the task again because the input has changed. More information here: https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:task_inputs_outputs

Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

Let's ship it!

@cpojer
Copy link
Contributor

cpojer commented May 9, 2019

Ah, actually @SimonSimya: do you mind signing the CLA? Just go to http://code.facebook.com/cla and follow the steps. Once that's done, I can merge your PR :)

@cpojer
Copy link
Contributor

cpojer commented Jun 4, 2019

Unfortunately we cannot merge PRs without a CLA :( Let me know if you have a chance to sign it and I will reopen it.

@cpojer cpojer closed this Jun 4, 2019
@amank22
Copy link

amank22 commented May 5, 2022

Although this change is outdated (with few extra deleteDirs added), is there any chance we can reopen this?

@cortinico
Copy link
Contributor

Although this change is outdated (with few extra deleteDirs added), is there any chance we can reopen this?

You can re-submit this PR @amank22

@amank22
Copy link

amank22 commented May 5, 2022

I tried the changes on my company project with AGP 7.1.3
Rn version: 0.65.1
Found few issues (maybe because of setup issues or latest agp, not sure)

- Gradle detected a problem with the following location: '<<path>>/APP-Afore'. Reason: Task ':mobile:bundleBuildReleaseJsAndAssets' uses this output of task ':rn-fetch-blob:writeReleaseAarMetadata' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Invalidating VFS because task ':mobile:bundleBuildReleaseJsAndAssets' failed validation
Not watching anything anymore
Watching 0 directory hierarchies to track changes

Caching disabled for task ':mobile:bundleBuildReleaseJsAndAssets' because:
  Caching has been disabled to ensure correctness. Please consult deprecation warnings for more details.

Task ':mobile:bundleBuildReleaseJsAndAssets' is not up-to-date because:
  Incremental execution has been disabled to ensure correctness. Please consult deprecation warnings for more details.

Maybe there are other things which needs to be done. Was about to give a PR but will see if I can find something more in detail.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No CLA Authors need to sign the CLA before a PR can be reviewed. Tech: Bundler 📦 This issue is related to the bundler (Metro, Haul, etc) used.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android: Task bundleReleaseJsAndAssets is not cached
7 participants