re-natal completely removed from the project and replaced with clj-rn

Signed-off-by: Aleksandr Pantiukhov <alwxndr@gmail.com>
This commit is contained in:
Aleksandr Pantiukhov 2018-07-17 17:59:18 +02:00
parent 4663c03ac7
commit d3b28ddbe8
No known key found for this signature in database
GPG Key ID: 153E4F21734042F5
19 changed files with 3207 additions and 2736 deletions

View File

@ -57,13 +57,12 @@ android/app/build
android/build
android/keystores/debug.keystore
# Generated by re-natal
# Generated by clj-rn
#
index.android.js
index.ios.js
target/
env/dev/env/config.cljs
.re-natal.local
externs/
shim.js
@ -87,9 +86,6 @@ figwheel_server.log
out
doo-index.html
# Re-natal
re-natal
# Status
Statusgo.framework
status-go-local.aar

6
.gitignore vendored
View File

@ -48,13 +48,12 @@ android/app/libs
android/app/obj
android/keystores/debug.keystore
# Generated by re-natal
# Generated by clj-rn
#
index.android.js
index.ios.js
target/
env/dev/env/config.cljs
.re-natal.local
externs/
shim.js
@ -78,9 +77,6 @@ figwheel_server.log
out
doo-index.html
# Re-natal
re-natal
# Status
Statusgo.framework
status-go-local.aar

View File

@ -1,57 +0,0 @@
{
"name": "StatusIm",
"interface": "reagent",
"platforms": {
"ios": {
"host": "localhost",
"modules": []
},
"android": {
"host": "10.0.2.2",
"modules": []
}
},
"modules": [
"realm",
"react-native-i18n",
"realm/react-native",
"dismissKeyboard",
"react-native-splash-screen",
"react-native-status",
"react-native-camera",
"react-native-qrcode",
"identicon.js",
"react-native-fs",
"react-native-dialogs",
"react-native-image-resizer",
"react-native-image-crop-picker",
"react-native-securerandom",
"react-native-webview-bridge",
"react-native-fcm",
"homoglyph-finder",
"web3",
"chance",
"instabug-reactnative",
"nfc-react-native",
"react-native-http-bridge",
"emojilib",
"react-native-config",
"react-native-svg",
"react-native-keychain",
"rn-snoopy",
"rn-snoopy/stream/bars",
"rn-snoopy/stream/filter",
"rn-snoopy/stream/buffer",
"react-native/Libraries/vendor/emitter/EventEmitter",
"react-native-background-timer",
"react-native-fetch-polyfill",
"react-native-testfairy"
],
"imageDirs": [
"resources/images"
],
"envRoots": {
"dev": "env/dev",
"prod": "env/prod"
}
}

1
Jenkinsfile vendored
View File

@ -32,7 +32,6 @@ timeout(90) {
sh 'rm -rf node_modules'
sh 'cp .env.jenkins .env'
sh 'lein deps'
installJSDeps()

View File

@ -34,7 +34,7 @@ timeout(90) {
sh 'rm -rf node_modules'
sh 'cp .env.jenkins .env'
sh 'lein deps'
installJSDeps()
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'

View File

@ -39,7 +39,6 @@ timeout(90) {
sh 'git fetch --tags'
sh 'rm -rf node_modules'
sh 'cp .env.nightly .env'
sh 'lein deps'
installJSDeps()

View File

@ -54,7 +54,6 @@ timeout(90) {
sh 'cat .env'
sh 'echo "**********************************************************************"'
sh 'lein deps'
installJSDeps()
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'

View File

@ -40,7 +40,7 @@ timeout(90) {
sh 'rm -rf node_modules'
sh 'cp .env.prod .env'
sh 'lein deps'
installJSDeps()
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'

View File

@ -44,7 +44,7 @@ timeout(90) {
sh 'rm -rf node_modules'
sh 'cp .env.prod .env'
sh 'lein deps'
installJSDeps()
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'

View File

@ -43,7 +43,7 @@ timeout(90) {
sh 'rm -rf node_modules'
sh 'cp .env.prod .env'
sh 'lein deps'
installJSDeps()
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'

View File

@ -30,11 +30,7 @@ setup: ##@prepare Install all the requirements for status-react
./scripts/setup
prepare: ##@prepare Install dependencies and prepare workspace
lein deps
npm install
./re-natal deps
./re-natal use-figwheel
./re-natal enable-source-maps
prepare-ios: prepare ##@prepare Install iOS specific dependencies
mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack
@ -69,41 +65,24 @@ full-prod-build: ##@build build prod for both Android and iOS
rm -r ./modules/react-native-status/ios/RCTStatus/Statusgo.framework/ 2> /dev/null || true
rm ./modules/react-native-status/android/libs/status-im/status-go/local/status-go-local.aar 2> /dev/null
#----------------
# Dev builds
#----------------
dev-android-real: ##@dev build for Android real device
./re-natal use-android-device real
./re-natal use-figwheel
dev-android-avd: ##@dev build for Android AVD simulator
./re-natal use-android-device avd
./re-natal use-figwheel
dev-android-genymotion: ##@dev build for Android Genymotion simulator
./re-natal use-android-device genymotion
./re-natal use-figwheel
dev-ios-real: ##@dev build for iOS real device
./re-natal use-ios-device real
./re-natal use-figwheel
dev-ios-simulator: ##@dev build for iOS simulator
./re-natal use-ios-device simulator
./re-natal use-figwheel
#--------------
# REPL
# -------------
repl: ##@repl Start REPL for iOS and Android
lein figwheel-repl ios android
repl-ios-real: ##@repl Start REPL for iOS real device
clj -R:repl build.clj figwheel --platform ios --ios-device real
repl-ios: ##@repl Start REPL for iOS
lein figwheel-repl ios
repl-ios-simulator: ##@repl Start REPL for iOS simulator
clj -R:repl build.clj figwheel --platform ios --ios-device simulator
repl-android: ##@repl Start REPL for Android
lein figwheel-repl android
repl-android-real: ##@repl Start REPL for Android real device
clj -R:repl build.clj figwheel --platform android --android-device real
repl-android-avd: ##@repl Start REPL for Android AVD
clj -R:repl build.clj figwheel --platform android --android-device avd
repl-android-genymotion: ##@repl Start REPL for Android Genymotion
clj -R:repl build.clj figwheel --platform android --android-device genymotion
#--------------
# Run
@ -160,9 +139,7 @@ startdev-%:
$(eval SYSTEM := $(word 2, $(subst -, , $@)))
$(eval DEVICE := $(word 3, $(subst -, , $@)))
case "$(SYSTEM)" in \
"android") ${MAKE} prepare && ${MAKE} android-ports-$(DEVICE);; \
"android") ${MAKE} prepare;; \
"ios") ${MAKE} prepare-ios;; \
esac
${MAKE} dev-$(SYSTEM)-$(DEVICE)
${MAKE} react-native &
${MAKE} repl-$(SYSTEM)
${MAKE} repl-$(SYSTEM)-$(DEVICE)

View File

@ -78,8 +78,6 @@ ADD .env.jenkins .env
ADD ./project.clj ./
RUN lein deps
ADD ./package.json package-lock.json ./
RUN npm install

View File

@ -1,6 +1,5 @@
(ns env.config)
(def figwheel-urls {
:ios "ws://localhost:3449/figwheel-ws"
:android "ws://10.0.3.2:3449/figwheel-ws"
})
(def figwheel-urls {:android "ws://192.168.10.203:3449/figwheel-ws",
:ios "ws://localhost:3449/figwheel-ws"}
)

View File

@ -13,8 +13,7 @@
(get 0 "")))
(defn re-frisk-url
"Expects the input url to be in the form ws://host:port/figwheel-ws
which is generated by re-natal"
"Expects the input url to be in the form ws://host:port/figwheel-ws"
[url]
(let [host (get-host url)]
(if (string/blank? host)

5706
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,7 +31,6 @@
"prop-types": "15.6.0",
"punycode": "1.4.1",
"querystring-es3": "0.2.1",
"re-natal": "0.8.1",
"react": "16.2.0",
"react-dom": "16.2.0",
"react-native": "github:status-im/react-native#status-0.55.4",

View File

@ -1,80 +0,0 @@
#!/bin/sh
[ `uname -s` != "Darwin" ] && return
function tab () {
local cmd=""
local cdto="$PWD"
local args="$@"
if [ -d "$1" ]; then
cdto=`cd "$1"; pwd`
args="${@:2}"
fi
if [ -n "$args" ]; then
cmd="; $args"
fi
iterm_exists=`osascript -e "id of application \"iterm2\""`
if [ ! -z iterm_exists ]; then
osascript &>/dev/null <<EOF
tell application "iTerm2"
tell current window
set newTab to (create tab with default profile)
tell newTab
tell current session
write text "cd \"$cdto\"$cmd"
end tell
end tell
end tell
end tell
EOF
else
osascript &>/dev/null <<END
tell app "Terminal" to do script "cd \"$cdto\"$cmd"
END
fi
}
# Install deps, prepare for genymotion and figwheel
npm install
cd ios && pod install && cd ..
lein deps && ./re-natal use-ios-device real && ./re-natal use-figwheel && lein re-frisk use-re-natal
mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack
# open figwheel in new tab
tab "BUILD_IDS=ios lein repl"
# open react-native package in new tab
tab "react-native start"
if [ ! -z $1 ]
then
device_type="$1"
fi
udid=$(instruments -s devices | grep "iPhone 8 (11.2) \[" | sed -E 's/[^\[]*\[([A-Z0-9-]*)\].*$/\1/')
# open ios/StatusIm.xcworkspace
if [ "$device_type" = "simulator" ]
then
xcrun instruments -w "${udid}"
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Debug -destination "platform=iOS Simulator,id=${udid}" -derivedDataPath 'build'
xcrun simctl install booted build/Build/Products/Debug-iphonesimulator/StatusIm.app
sleep 90
xcrun simctl launch booted im.status.ethereum
fi
real_device_udid=$(system_profiler SPUSBDataType | sed -n -E -e '/(iPhone|iPad)/,/Serial/s/ *Serial Number: *(.+)/\1/p')
if [ "$device_type" = "real" ]
then
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Debug -destination "platform=iOS,id=${real_device_udid}" -derivedDataPath 'build'
sleep 60
ios-deploy -i "${real_device_udid}" --justlaunch --bundle build/Build/Products/Debug-iphoneos/StatusIm.app
fi
if [ ! -z $1 ]
then
xcrun instruments -w "${udid}"
fi

View File

@ -60,13 +60,13 @@ device=$(/Applications/Genymotion\ Shell.app/Contents/MacOS/genyshell -c "device
open -a /Applications/Genymotion.app/Contents/MacOS/player.app --args --vm-name "${device##*| }"
fi
# Install deps, prepare for genymotion and figwheel
lein deps && npm install && ./re-natal use-android-device "${device_type}" && ./re-natal use-figwheel && npm install
# Install deps
npm install
cd android && ./gradlew react-native-android:installArchives && cd ../
# open figwheel in new tab
tab "lein figwheel-repl ${cljs_build}"
tab "clj -R:repl build.clj figwheel --platform ${cljs_build} --ios-device ${device_type}"
# open react-native package in new tab
tab "react-native start"

View File

@ -38,15 +38,8 @@ install_cocoapods
####
echo && setup_header "Installing dependencies..."
dependency_setup lein deps
dependency_setup npm install
dependency_setup \
"ln -sf '$(repo_path)/node_modules/re-natal/index.js' '$(repo_path)/re-natal'"
dependency_setup ./re-natal deps
dependency_setup ./re-natal enable-source-maps
dependency_setup \
"mvn -f modules/react-native-status/ios/RCTStatus/pom.xml dependency:unpack"