diff --git a/Makefile b/Makefile index 29653d4e51..ef3bc120d1 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ help: ##@other Show this help @perl -e '$(HELP_FUN)' $(MAKEFILE_LIST) +OS := $(shell uname) + # This is a code for automatic help generator. # It supports ANSI colors and categories. # To add new item into help output, simply add comments @@ -27,7 +29,7 @@ HELP_FUN = \ # Main targets clean: ##@prepare Remove all output folders - git clean -qdxf -f modules/react-native-status/ node_modules/ target/ desktop/modules/ desktop/node_modules/ + git clean -qdxf -f android/ modules/react-native-status/ node_modules/ target/ desktop/modules/ desktop/node_modules/ setup: ##@prepare Install all the requirements for status-react ./scripts/setup @@ -38,10 +40,12 @@ prepare: ##@prepare Install dependencies and prepare workspace prepare-ios: prepare ##@prepare Install iOS specific dependencies mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack - cd ios && pod install && cd .. +ifeq ($(OS),Darwin) + cd ios && pod install +endif prepare-android: prepare ##@prepare Install Android specific dependencies - cd android; ./gradlew react-native-android:installArchives + cd android && ./gradlew react-native-android:installArchives #---------------- # Release builds diff --git a/scripts/lib/setup/installers.sh b/scripts/lib/setup/installers.sh index 7190455fe8..378024435e 100755 --- a/scripts/lib/setup/installers.sh +++ b/scripts/lib/setup/installers.sh @@ -333,7 +333,4 @@ function install_android_ndk() { echo "ndk.dir=$_ndkTargetDir" | tee -a $_localPropertiesPath && \ cecho "@blue[[Android NDK installation completed in $_ndkTargetDir.]]" fi - - dependency_setup \ - "pushd android && ./gradlew react-native-android:installArchives && popd" -} \ No newline at end of file +} diff --git a/scripts/setup b/scripts/setup index f93d105cd4..be370b7466 100755 --- a/scripts/setup +++ b/scripts/setup @@ -39,11 +39,7 @@ install_cocoapods #### echo && setup_header "Installing dependencies..." -dependency_setup npm install - -dependency_setup \ - "mvn -f modules/react-native-status/ios/RCTStatus/pom.xml dependency:unpack" - -using_cocoapods && dependency_setup "pushd ios && pod install && popd" +dependency_setup make prepare-android +dependency_setup make prepare-ios setup_complete