#############################
# SETUP THE FOLLOWING LINKS
#############################
#
# 0) using /usr/local/opt with symbolic links  (just like brew)
# 
# 1) create links to paths of android sdk/ndk tools binaries
#   ln -s  /Users/j3g/apps/android-dev/android-sdk  /usr/local/opt/android-sdk
#   ln -s  /Users/j3g/apps/android-sdk/ndk-bundle /usr/local/opt/android-ndk
# 
# 2) create links to JDK  (Android Studio includes a Java 8 SDK, so use that)
#   ln -s "/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home" /usr/local/opt/java-home
# 
# 
# [ MISC ]
# Standard Defatul Java SDK location
# sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home /Library/Java/JavaVirtualMachines/current
# GRADLE_HOME="/Applications/Android Studio.app/Contents/gradle/gradle-4.1"
# 
# 
ANDROID_SDK_HOME='/usr/local/opt/android-sdk'
ANDROID_NDK_HOME='/usr/local/opt/android-ndk'
ANDROID_AVD_HOME=/Users/j3g
GRADLE_HOME="/usr/local/opt/gradle"
ANT_HOME='/usr/local/opt/ant'
JUNIT_HOME='/usr/local/lib/junit'
BUILD_TOOLS_VER='25.0.2'
# assumes a symbolic link has been created (from setup above)
JAVA_HOME='/usr/local/opt/java-home'

# path to binaries
export JAVA_BIN=$JAVA_HOME/bin
export GRADLE_BIN=$GRADLE_HOME/bin
export ANT_BIN=$ANT_HOME/bin
export PATH=$JAVA_BIN:$GRADLE_BIN:$ANT_BIN:$PATH

# environment vars -- used by build tools (ant)
export JAVA_HOME=$JAVA_HOME
export ANT_HOME=$ANT_HOME

# set path to android tool binaries
export PATH=$ANDROID_SDK_HOME/build-tools/$BUILD_TOOLS_VER:$PATH
export PATH=$ANDROID_SDK_HOME/platform-tools:$PATH
export PATH=$ANDROID_SDK_HOME/tools:$PATH

# ndk tools
export PATH=$ANDROID_NDK_HOME:$PATH
export PATH=$ANDROID_NDK_HOME/build/tools:$PATH

# 12/14/2016 had to unset the variable to get virtual devices working
#unset ANDROID_SDK_HOME
