expo / turtle

Standalone app builder service
MIT License
384 stars 29 forks source link

Accept `--before-build` in `turtle build` to allow arbitrary scripted manipulation of files, in hopes of avoiding `expo eject` #246

Closed papb closed 4 years ago

papb commented 4 years ago

Feature Request

Motivation Behind Feature

This feature would allow avoiding have to expo eject just to make some very minor changes to java/gradle files.

Here is my situation as an example:

Feature Description

Are there any drawbacks? Will this break anything for existing users?

No. This will be an opt-in usage.

Alternatives or Workarounds

None that I know of. I might try to look at turtle source code to see if I can find the appropriate time to sneak in this call myself...

wkozyra95 commented 4 years ago

Hi

It's unlikely we will want to add sth like this, this solution is quite hacky plus we would be breaking compatibility when changing project structure.

As a workaround, you can modify "project template" in ~/.turtle/workingdir/android/sdk38/android/ directory, when building turtle is making a copy of that dir (to android-shell-app) and doing some processing on that copy, but if changes are minimal you might be able to add that.

You will lose all changes when updating to new turtle if we change that template in a meantime

papb commented 4 years ago

Hello, thank you, sorry to take long to reply!

I understand. Thanks for sharing this workaround!

In my case, I ended up finding another module that solves my problem without needing to eject. But if I hit a similar issue in the future, I will try the workaround you suggested. Thank you very much!