Here will be all you need to set up a wsl environment (ubuntu) to run local builds using expo eas.
A linux environment;
Tools:
* Curl
Libs:
* Node v16
* NVM
* Java v17
* Git
* Android-SDK
* Android-SDK-build-tools
* SDK Manager
* Yarn
sudo apt install curl
install it, and you good to go.
If you notice any sort of error while using a command, you may run it as sudo.
curl -s https://deb.nodesource.com/setup_16.x | sudo bash
add NodeSource PPA.
sudo apt install nodejs -y
install it.
node -v
verify its version, it should be v16.
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
download it.
source ~/.bashrc
complete your install.
sudo apt-get update
sudo apt-get upgrade
sudo apt install openjdk-17-jdk openjdk-17-jre
install.
sudo apt update
update the system package.
sudo apt install git
install.
git --version
verify its version.
sudo apt update
sudo apt install android-sdk
install.
sudo apt-get update
sudo apt-get -y install android-sdk-build-tools
install.
sudo apt install sdkmanager
install.
sdkmanager --version
verify its version.
sudo npm install --global yarn
install.
yarn --version
verify its version.
Now, let's configure the ANDROID_SDK_ROOT path, for that:
nano ~/.profile
.
At the bottom of the file, insert export ANDROID_SDK_ROOT=/usr/lib/android-sdk
.
Save it and exit.
The next step is to accept the sdkmanager licenses.
Run sudo chmod -R 777 /usr/lib/android-sdk/
.
Now, just type sdkmanager --licenses
and accept all of them.
Feel free to add a folder for your project using mkdir your-folder-name
if you want to.
git clone -b your-branch your-project-url
-b is optional.
Then use your app passwords key to complete the download (if you're using bitbucket).
Inside your project folder, run the usual commands (like npm install).
Now, you are able to build your project: run eas build --profile your-profile-name --local
.
Enjoy!.