fix(android): refactor font copy / support android gradle plugin 4.1+ #1307
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.
Hi there! Thanks so much for this module, @oblador, I've been using it quite a while.
I noticed in #1265 that Android Gradle Plugin 4.1 broke the font copy gradle task, similar to the way react-native bundle copy had to be altered to support that version
I had time to look at their bundle copy and updated the font copy here to more closely match their script's copy task: https://github.com/facebook/react-native/blob/c76070412fccdaa82bf4af3c94809d04ae71777e/react.gradle#L282-L317
Previously I was not able to see my react-native-vector-icons in the APK in release mode with android gradle plugin 4.1 but with these changes I can now see them. It should be backwards compatible as well and my build uses flavors and ABI splits so those appear fine to me in testing as well.
Changes:
this is based heavily off the react-native JS bundle copy task
this was developed in collaboration with @gulshan183
Fixes #1265
Obsoletes #1271
I am currently using this as a patch
react-native-vector-icons+8.0.0.patch.txt (remove the .txt extension and drop it in patches directory) with patch-package in case anyone else wants to try it out or needs it now