-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.envrc
25 lines (19 loc) · 927 Bytes
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
source_up
export_from_nix_shell() {
export $1="$(nix eval -f shell.nix --raw $1)"
}
# This can be very slow! Install Java yourself or use nix-shell
#export_from_nix_shell JAVA_HOME
export_from_nix_shell ANDROID_SDK_ROOT
export_from_nix_shell ANDROID_NDK_ROOT
# deprecated by android studio, still used by react-native
export_from_nix_shell ANDROID_HOME
export_from_nix_shell ANDROID_NDK
PATH_add $ANDROID_SDK_ROOT/tools/bin $ANDROID_SDK_ROOT/platform-tools $ANDROID_NDK_ROOT
# Add build-tools to path
buildtoolsdirs=($ANDROID_SDK_ROOT/build-tools/*) # Glob all installed build-tools versions
if grep --fixed-strings --invert-match '*' <<< "$buildtoolsdirs"&>/dev/null ; then # If the glob matched any...
PATH_add "${buildtoolsdirs[${#buildtoolsdirs[@]}-1]}" # Add the last one (highest version) to $PATH
fi
# This seems like it would be useful but breaks the expoview build
# watch_file $ANDROID_SDK_ROOT/build-tools