Simplify setup script and fix Android build when setting up from scratch
- gradle was being called without `npm install` having had a chance to execute Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
This commit is contained in:
parent
3d6c2855be
commit
b7b6a252e1
10
Makefile
10
Makefile
|
@ -3,6 +3,8 @@
|
||||||
help: ##@other Show this help
|
help: ##@other Show this help
|
||||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||||
|
|
||||||
|
OS := $(shell uname)
|
||||||
|
|
||||||
# This is a code for automatic help generator.
|
# This is a code for automatic help generator.
|
||||||
# It supports ANSI colors and categories.
|
# It supports ANSI colors and categories.
|
||||||
# To add new item into help output, simply add comments
|
# To add new item into help output, simply add comments
|
||||||
|
@ -27,7 +29,7 @@ HELP_FUN = \
|
||||||
# Main targets
|
# Main targets
|
||||||
|
|
||||||
clean: ##@prepare Remove all output folders
|
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
|
setup: ##@prepare Install all the requirements for status-react
|
||||||
./scripts/setup
|
./scripts/setup
|
||||||
|
@ -38,10 +40,12 @@ prepare: ##@prepare Install dependencies and prepare workspace
|
||||||
|
|
||||||
prepare-ios: prepare ##@prepare Install iOS specific dependencies
|
prepare-ios: prepare ##@prepare Install iOS specific dependencies
|
||||||
mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack
|
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
|
prepare-android: prepare ##@prepare Install Android specific dependencies
|
||||||
cd android; ./gradlew react-native-android:installArchives
|
cd android && ./gradlew react-native-android:installArchives
|
||||||
|
|
||||||
#----------------
|
#----------------
|
||||||
# Release builds
|
# Release builds
|
||||||
|
|
|
@ -333,7 +333,4 @@ function install_android_ndk() {
|
||||||
echo "ndk.dir=$_ndkTargetDir" | tee -a $_localPropertiesPath && \
|
echo "ndk.dir=$_ndkTargetDir" | tee -a $_localPropertiesPath && \
|
||||||
cecho "@blue[[Android NDK installation completed in $_ndkTargetDir.]]"
|
cecho "@blue[[Android NDK installation completed in $_ndkTargetDir.]]"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
dependency_setup \
|
|
||||||
"pushd android && ./gradlew react-native-android:installArchives && popd"
|
|
||||||
}
|
|
||||||
|
|
|
@ -39,11 +39,7 @@ install_cocoapods
|
||||||
####
|
####
|
||||||
echo && setup_header "Installing dependencies..."
|
echo && setup_header "Installing dependencies..."
|
||||||
|
|
||||||
dependency_setup npm install
|
dependency_setup make prepare-android
|
||||||
|
dependency_setup make prepare-ios
|
||||||
dependency_setup \
|
|
||||||
"mvn -f modules/react-native-status/ios/RCTStatus/pom.xml dependency:unpack"
|
|
||||||
|
|
||||||
using_cocoapods && dependency_setup "pushd ios && pod install && popd"
|
|
||||||
|
|
||||||
setup_complete
|
setup_complete
|
||||||
|
|
Loading…
Reference in New Issue