Skip to content

Instantly share code, notes, and snippets.



Last active Jul 2, 2021
What would you like to do?
Fastlane Android app environment setup on Windows
source ""
ruby ">= 2.6.0"
gem "fastlane", ">= 2.126.0"
gem "git"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
#Requires -RunAsAdministrator
Function DoesCommandExists {
Param ($command)
try { if(Get-Command $command -erroraction 'silentlycontinue'){ return $true } }
catch { return $false }
"Settings environment variables LC_ALL and LANG"
[Environment]::SetEnvironmentVariable("LC_ALL", "en_US.UTF-8", "Machine")
[Environment]::SetEnvironmentVariable("LANG", "en_US.UTF-8", "Machine")
$hasInstalledChocolatey = DoesCommandExists choco
If ($hasInstalledChocolatey) {
"Updating Chocolatey"
choco upgrade chocolatey
} Else {
"Installing Chocolatey"
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(''))
$hasInstalledRuby = DoesCommandExists ruby
If ($hasInstalledRuby) {
"Updating ruby"
choco upgrade ruby --version $RUBY_VERSION -y
} Else {
"Installing ruby"
choco install ruby --version $RUBY_VERSION -y
Write-Host "To finish the installation close the Powershell window and reopen it then rerun the script - (exit)" -ForegroundColor red
"ridk install - denpendency for bundle install"
ridk install 1 2 3
$hasInstalledBundler = DoesCommandExists bundle
If ($hasInstalledBundler) {
"Updating bundler"
gem update bundler
} Else {
"Installing bundler"
gem install bundler
bundle install
Write-Host "You are ready to go" -ForegroundColor green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment