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

Android missing replaceInFile directive #1060

Closed
davidgovea opened this issue Jan 28, 2019 · 2 comments · May be fixed by electrode-io/electrode-native-manifest#115
Closed

Android missing replaceInFile directive #1060

davidgovea opened this issue Jan 28, 2019 · 2 comments · May be fixed by electrode-io/electrode-native-manifest#115

Comments

@davidgovea
Copy link
Contributor

replaceInFile is listed as a platform-independent directive, but it looks like it's not implemented on Android.

I'm working on a manifest entry for a more involved RN module: react-native-gesture-handler, which needs edits to the ReactActivityDelegate class definition (https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html).

File replacement is not necessarily the best way to do this, but it is a very powerful directive that unlocks a lot of possibilities.

I have an initial implementation here: https://github.com/electrode-io/electrode-native/compare/master...runtrizapps:feature/android-replace-in-file?expand=1


Worth noting: I'm performing the replacements after the mustache templates are evaluated, which may differ from the approach on iOS (it seems like replaceInFile is designed to process incoming plugin files, not the final container files).

Perhaps a container transformer would be more appropriate? Not sure if there is a way to link a manifest-plugin entry with a container transformation..

Not submitting a PR at this time: just want to hear thoughts/rationale from the team. Happy to refactor or try out different approaches.

Thank you!

@deepueg
Copy link
Contributor

deepueg commented Jan 30, 2019

@davidgovea Thanks for opening this issue and providing suggestions. We will have a discussion around this to consider various options and let you know the path forward. Thanks again.

@davidgovea
Copy link
Contributor Author

Live in v0.34.0, thank you!

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 a pull request may close this issue.

2 participants