Create a script that runs bash scripts/install-homebrew.sh followed by brew install temurin11, but only if running on macOS.
See if that works. If it complains about running as root, you could patch the install-homebrew.sh script to skip that check.
You might need to add stuff to the PATH or specify the full path to the brew command
Note: Of course this would increase the time it takes to build and seems rather wasteful to do every time. Not sure if you can cache this somehow. Alternatively, maybe you can tar up a local installation of java and host it somewhere, then download and untar it during the build. Or maybe you can cache it somehow, but I think the EAS caching stuff is currently only for dependencies
EDIT: Actually I’ve just re-read the “Custom caching” section and it looks like it could maybe be used to cache a tar file. So maybe you could check for the tar file and untar it to the right place if it exists. If it doesn’t exist, install it with Homebrew and then tar it up so that it can be cached for next time. See: Build schema for eas.json - Expo Documentation
Yes, EAS uses .gitignore by default to decide what to upload or ignore. You can work around this by copying .gitignore to .easignore and then removing app only from .easignore.
But you run the risk of .gitignore and .easignore getting out of sync.
It might make sense just to commit the app directory to Git.
Good news, Homebrew is already installed on the macOS build workers!
So you should just be able to install temurin11 or whatever in a build hook. I’ve been told it might be a good idea to set HOMEBREW_NO_AUTO_UPDATE=1 to speed things up. Also, you’d want to avoid running this for the Android builds.
You could do the temurin install in a pre-install hook and the ClojureScript build in a post-install hook, but they can also just be done in the same hook. Doing stuff in the pre-install hook is a lot faster while you’re testing and tweaking the hook script, though, because you don’t have to wait for several other steps before you know whether it’s working as intended
I tried this last night and it worked fine:
if [[ "$EAS_BUILD_PLATFORM" == "ios" ]]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install homebrew/cask-versions/temurin11
exec npx shadow-cljs release app
The only issue is that it seems shadow-cljs does not exit with a non-zero exit status if e.g. there’s no shadow-cljs.edn file. So the build continues and will run into errors later because there’s no app directory.