Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9335d0b8e |
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
"module:metro-react-native-babel-preset"
|
||||
],
|
||||
"plugins": [
|
||||
"react-native-reanimated/plugin"
|
||||
]
|
||||
}
|
||||
@@ -1,236 +0,0 @@
|
||||
status-im.utils.build/warning-handler
|
||||
status-im.utils.build/get-current-sha
|
||||
status-im.chat.constants/spacing-char
|
||||
status-im.chat.constants/arg-wrapping-char
|
||||
status-im.ios.core/init
|
||||
status-im.ui.components.camera/aspects
|
||||
status-im.ui.components.camera/capture-targets
|
||||
status-im.ui.components.camera/set-torch
|
||||
status-im.ui.components.camera/request-access-ios
|
||||
status-im.chat.models.message-content/stylings
|
||||
status-im.chat.models.message-content/actions
|
||||
status-im.chat.models.message-content/blank-string
|
||||
status-im.chat.models.message-content/sorted-ranges
|
||||
status-im.ethereum.mnemonic/words->passphrase
|
||||
status-im.native-module.core/listener
|
||||
status-im.native-module.core/multiaccount-reset
|
||||
status-im.native-module.core/extract-group-membership-signatures
|
||||
status-im.native-module.core/sign-group-membership
|
||||
status-im.native-module.core/update-mailservers
|
||||
status-im.ethereum.abi-spec/bytes-to-hex
|
||||
status-im.android.core/init
|
||||
status-im.chat.models.message/transport-keys
|
||||
status-im.utils.datetime/week
|
||||
status-im.utils.datetime/time-ago
|
||||
status-im.utils.datetime/format-date
|
||||
status-im.utils.datetime/get-ordinal-date
|
||||
reagent.dom/render
|
||||
reagent.dom/unmount-component-at-node
|
||||
reagent.dom/dom-node
|
||||
reagent.dom/force-update-all
|
||||
status-im.multiaccounts.create.core/get-new-key-code
|
||||
status-im.ethereum.decode/string
|
||||
status-im.ui.screens.network.views/mainnet?
|
||||
status-im.data-store.chats/event->string
|
||||
status-im.mailserver.constants/seven-days
|
||||
status-im.mailserver.constants/connection-timeout
|
||||
status-im.hardwallet.card/install-applet
|
||||
status-im.hardwallet.card/install-cash-applet
|
||||
status-im.multiaccount.login.data-test/all-contacts
|
||||
status-im.multiaccount.login.data-test/multiaccounts
|
||||
status-im.multiaccount.login.data-test/get-chats
|
||||
status-im.multiaccount.login.data-test/transport
|
||||
status-im.multiaccount.login.data-test/topics
|
||||
status-im.utils.utils/clear-timeout
|
||||
status-im.utils.handlers/logged-in
|
||||
status-im.multiaccounts.model/credentials
|
||||
status-im.multiaccounts.login.core/contract-fleet?
|
||||
status-im.multiaccounts.login.core/fetch-nodes
|
||||
status-im.utils.config/rpc-networks-only?
|
||||
status-im.utils.config/waku-enabled?
|
||||
status-im.utils.pairing/has-paired-installations?
|
||||
status-im.tribute-to-talk.core-test/user-cofx
|
||||
quo.gesture-handler/tap-gesture-handler
|
||||
quo.gesture-handler/pan-gesture-handler
|
||||
quo.gesture-handler/long-press-gesture-handler
|
||||
quo.gesture-handler/pure-native-button
|
||||
quo.gesture-handler/createNativeWrapper
|
||||
quo.gesture-handler/animated-raw-button
|
||||
quo.gesture-handler/states
|
||||
mocks.js-dependencies/action-button
|
||||
mocks.js-dependencies/camera
|
||||
mocks.js-dependencies/dismiss-keyboard
|
||||
mocks.js-dependencies/emoji-picker
|
||||
mocks.js-dependencies/i18n
|
||||
mocks.js-dependencies/qr-code
|
||||
mocks.js-dependencies/svg
|
||||
mocks.js-dependencies/icons
|
||||
mocks.js-dependencies/webview
|
||||
mocks.js-dependencies/desktop-linking
|
||||
mocks.js-dependencies/desktop-shortcuts
|
||||
mocks.js-dependencies/snoopy
|
||||
mocks.js-dependencies/snoopy-filter
|
||||
mocks.js-dependencies/snoopy-bars
|
||||
mocks.js-dependencies/snoopy-buffer
|
||||
mocks.js-dependencies/desktop-menu
|
||||
mocks.js-dependencies/desktop-config
|
||||
mocks.js-dependencies/react-native-navigation-twopane
|
||||
mocks.js-dependencies/react-native-screens
|
||||
mocks.js-dependencies/react-native-shake
|
||||
mocks.js-dependencies/back-handler
|
||||
mocks.js-dependencies/react
|
||||
mocks.js-dependencies/react-navigation-native
|
||||
mocks.js-dependencies/react-navigation-stack
|
||||
mocks.js-dependencies/react-navigation-bottom-tabs
|
||||
mocks.js-dependencies/react-native-haptic-feedback
|
||||
mocks.js-dependencies/mock
|
||||
quo.previews.main/init
|
||||
status-im.chat.models.message-list-test/descending-range
|
||||
status-im.chat.models.message-list-test/random-range
|
||||
status-im.ethereum.eip165/supports?
|
||||
status-im.utils.hex/valid-hex?
|
||||
status-im.multiaccounts.core/chat-send?
|
||||
status-im.hardwallet.simulated-keycard/install-cash-applet
|
||||
status-im.hardwallet.simulated-keycard/sign-typed-data
|
||||
status-im.utils.core/safe-read-message-content
|
||||
status-im.ui.components.react/native-modules
|
||||
status-im.ui.components.react/progress-bar
|
||||
status-im.utils.fs/move-file
|
||||
status-im.utils.fs/read-dir
|
||||
status-im.utils.fs/mkdir
|
||||
status-im.utils.fs/unlink
|
||||
status-im.utils.fs/file-exists?
|
||||
quo.animated/code
|
||||
quo.animated/eq
|
||||
quo.animated/neq
|
||||
quo.animated/greater-or-eq
|
||||
quo.animated/not*
|
||||
quo.animated/or*
|
||||
quo.animated/and*
|
||||
quo.animated/add
|
||||
quo.animated/sub
|
||||
quo.animated/multiply
|
||||
quo.animated/abs
|
||||
quo.animated/min*
|
||||
quo.animated/max*
|
||||
quo.animated/set
|
||||
quo.animated/start-clock
|
||||
quo.animated/stop-clock
|
||||
quo.animated/bezier
|
||||
quo.animated/linear
|
||||
quo.animated/set-value
|
||||
quo.animated/clock
|
||||
quo.animated/debug
|
||||
quo.animated/log
|
||||
quo.animated/event
|
||||
quo.animated/on-change
|
||||
quo.animated/cond*
|
||||
quo.animated/block
|
||||
quo.animated/call*
|
||||
quo.animated/timing
|
||||
quo.animated/spring
|
||||
quo.animated/clamp
|
||||
quo.animated/with-spring
|
||||
quo.animated/with-timing
|
||||
quo.animated/re-timing
|
||||
quo.design-system.colors/white
|
||||
quo.design-system.colors/black
|
||||
status-im.transport.core-test/messages
|
||||
status-im.ethereum.core/sidechain?
|
||||
status-im.ethereum.core/network-with-upstream-rpc?
|
||||
status-im.ethereum.core/current-address
|
||||
status-im.ethereum.core/network->network-name
|
||||
status-im.ethereum.core/estimate-gas
|
||||
quo.core/animated-header
|
||||
quo.core/safe-area-provider
|
||||
quo.core/safe-area-consumer
|
||||
quo.core/safe-area-view
|
||||
status-im.utils.universal-links.core/open!
|
||||
status-im.transport.filters.core-test/member-2
|
||||
status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
|
||||
status-im.ethereum.ens/ttl
|
||||
status-im.ethereum.ens/addr-hash
|
||||
status-im.ethereum.ens/name-hash
|
||||
status-im.ethereum.ens/ABI-hash
|
||||
status-im.ethereum.ens/pubkey-hash
|
||||
status-im.network.core/get-network
|
||||
status-im.constants/desktop-content-types
|
||||
status-im.constants/blocks-per-hour
|
||||
status-im.constants/one-earth-day
|
||||
status-im.constants/left-pane-min-width
|
||||
status-im.constants/system
|
||||
status-im.constants/contact-discovery
|
||||
status-im.constants/send-transaction-failed-parse-response
|
||||
status-im.constants/send-transaction-failed-parse-params
|
||||
status-im.constants/send-transaction-no-account-selected
|
||||
status-im.constants/send-transaction-invalid-tx-sender
|
||||
status-im.constants/web3-get-logs
|
||||
status-im.constants/web3-transaction-receipt
|
||||
status-im.constants/web3-new-filter
|
||||
status-im.constants/web3-new-pending-transaction-filter
|
||||
status-im.constants/web3-new-block-filter
|
||||
status-im.constants/web3-uninstall-filter
|
||||
status-im.constants/web3-get-filter-changes
|
||||
status-im.constants/web3-shh-post
|
||||
status-im.constants/web3-shh-new-identity
|
||||
status-im.constants/web3-shh-has-identity
|
||||
status-im.constants/web3-shh-new-group
|
||||
status-im.constants/web3-shh-add-to-group
|
||||
status-im.constants/web3-shh-new-filter
|
||||
status-im.constants/web3-shh-uninstall-filter
|
||||
status-im.constants/web3-shh-get-filter-changes
|
||||
status-im.constants/web3-shh-get-messages
|
||||
status-im.constants/status-create-address
|
||||
status-im.constants/event-transfer-hash
|
||||
status-im.constants/regx-rtl-characters
|
||||
status-im.constants/desktop-msg-chars-hard-limit
|
||||
status-im.constants/debug-metrics
|
||||
status-im.constants/scan-qr-code
|
||||
status-im.constants/ipfs-proto-code
|
||||
status-im.constants/swarm-proto-code
|
||||
status-im.multiaccounts.update.publisher/publish-update!
|
||||
status-im.utils.async/task-queue
|
||||
status-im.utils.async/async-periodic-run!
|
||||
status-im.desktop.core/app-root
|
||||
status-im.desktop.core/init
|
||||
status-im.chat.models-test/test-db
|
||||
quo.design-system.spacing/padding-vertical
|
||||
status-im.utils.money/percent-change
|
||||
status-im.utils.platform/isMacOs?
|
||||
status-im.utils.platform/isNix?
|
||||
status-im.utils.platform/isWin?
|
||||
status-im.utils.platform/android-version>=
|
||||
status-im.utils.debounce/clear-all
|
||||
status-im.transport.db/create-chat
|
||||
status-im.utils.priority-map/priority-map
|
||||
status-im.utils.priority-map/priority-map-by
|
||||
status-im.utils.priority-map/priority-map-keyfn
|
||||
status-im.utils.priority-map/empty-message-map
|
||||
status-im.wallet.choose-recipient.core/use-default-eth-gas
|
||||
status-im.ui.components.animation/decay
|
||||
status-im.ui.components.animation/remove-all-listeners
|
||||
status-im.ui.components.animation/stop-animation
|
||||
status-im.ui.components.animation/animated
|
||||
status-im.ui.components.animation/add
|
||||
status-im.ui.components.animation/subtract
|
||||
status-im.ui.components.animation/get-layout
|
||||
status-im.wallet.transactions-test/uri-query-data
|
||||
quo.react-native/touchable-highlight
|
||||
status-im.utils.name/shortened-name
|
||||
status-im.ui.components.button.haptic/trigger
|
||||
status-im.contact.db/filter-dapps
|
||||
status-im.contact.db/filter-group-contacts
|
||||
status-im.contact.db/legacy-pending?
|
||||
status-im.utils.transducers-test/preview-call-1
|
||||
status-im.utils.transducers-test/preview-call-2
|
||||
status-im.utils.types/to-string
|
||||
status-im.chat.db/datemark?
|
||||
status-im.chat.db/gap?
|
||||
status-im.chat.db/map->sorted-seq
|
||||
status-im.utils.snoopy/status-module-filter
|
||||
status-im.utils.snoopy/websocket-filter
|
||||
status-im.utils.snoopy/touches-filter
|
||||
status-im.utils.snoopy/native-animation-filter
|
||||
status-im.utils.snoopy/keyboard-observer-filter
|
||||
status-im.utils.multihash/hex
|
||||
status-im.utils.multihash/decode-array
|
||||
@@ -1,13 +0,0 @@
|
||||
{:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
status-im.utils.views/letsubs clojure.core/let
|
||||
reagent.core/with-let clojure.core/let
|
||||
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
|
||||
quo.react/with-deps-check clojure.core/fn
|
||||
quo.previews.preview/list-comp clojure.core/for
|
||||
status-im.utils.styles/def clojure.core/def
|
||||
status-im.utils.styles/defn clojure.core/defn
|
||||
taoensso.tufte/defnp clojure.core/defn}
|
||||
:linters {:invalid-arity {:skip-args [status-im.utils.fx/defn]}
|
||||
;;TODO remove number when this is fixed
|
||||
;;https://github.com/borkdude/clj-kondo/issues/867
|
||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY number]}}}
|
||||
@@ -1,22 +0,0 @@
|
||||
# https://dependabot.com/docs/config-file/
|
||||
|
||||
version: 1
|
||||
update_configs:
|
||||
# Keep build.gradle files up to date, batching pull requests weekly
|
||||
- package_manager: "java:gradle"
|
||||
directory: "/android"
|
||||
update_schedule: "weekly"
|
||||
default_reviewers:
|
||||
- "jakubgs"
|
||||
allowed_updates:
|
||||
- match:
|
||||
update_type: "security"
|
||||
# Keep /mobile/js_files/yarn.lock up to date, batching pull requests weekly
|
||||
- package_manager: "javascript"
|
||||
directory: "/"
|
||||
update_schedule: "weekly"
|
||||
allowed_updates:
|
||||
- match:
|
||||
update_type: security
|
||||
default_reviewers:
|
||||
- "jakubgs"
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
.dockerignore
|
||||
docker-build
|
||||
env/dev/env/config.cljs
|
||||
modules/react-native-status/android/build
|
||||
|
||||
|
||||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
.projectile
|
||||
.cljs_rhino_repl/
|
||||
.#*
|
||||
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
project.xcworkspace
|
||||
|
||||
# Android/IJ
|
||||
#
|
||||
.idea
|
||||
.gradle
|
||||
*.iml
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
android/app/libs
|
||||
android/app/obj
|
||||
android/app/build
|
||||
android/build
|
||||
android/keystores/debug.keystore
|
||||
|
||||
# Generated by clj-rn
|
||||
#
|
||||
index.android.js
|
||||
index.ios.js
|
||||
target/
|
||||
env/dev/env/config.cljs
|
||||
externs/
|
||||
shim.js
|
||||
|
||||
# Generated by lein voom
|
||||
#
|
||||
/pom.xml
|
||||
|
||||
|
||||
# Figwheel
|
||||
#
|
||||
figwheel_server.log
|
||||
.nrepl-port
|
||||
|
||||
# Lein
|
||||
#
|
||||
.lein-failures
|
||||
.lein-repl-history
|
||||
|
||||
## Doo
|
||||
#
|
||||
out
|
||||
doo-index.html
|
||||
|
||||
# Status
|
||||
Statusgo.framework
|
||||
status-dev-cli
|
||||
|
||||
#ios
|
||||
ios/Pods
|
||||
ios/StatusIm.xcworkspace
|
||||
.ruby-version
|
||||
|
||||
#python
|
||||
*.pyc
|
||||
*.cache
|
||||
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
*/fastlane/report.xml
|
||||
*/fastlane/Preview.html
|
||||
*/fastlane/screenshots
|
||||
@@ -1,34 +1 @@
|
||||
CACHED_WEBVIEWS_ENABLED=1
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
DEV_BUILD=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
STATUS_GO_PROTOCOL=0
|
||||
STATUS_GO_ENABLE_NIMBUS=0
|
||||
KEYCARD_TEST_MENU=0
|
||||
QR_READ_TEST_MENU=1
|
||||
ENABLE_ROOT_ALERT=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
MAX_IMAGES_BATCH=5
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
COMMUNITIES_ENABLED=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
COLLECTIBLES_ENABLED=1
|
||||
COMMANDS_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
SWAP_ENABLED=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
TESTFAIRY_ENABLED=0
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=goerli_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.staging
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
PAIRING_POPUP_DISABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
STICKERS_ENABLED=1
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
BLANK_PREVIEW=0
|
||||
TOOLTIP_EVENTS=1
|
||||
COMMANDS_ENABLED=1
|
||||
KEYCARD_TEST_MENU=1
|
||||
QR_READ_TEST_MENU=1
|
||||
ENABLE_ROOT_ALERT=0
|
||||
MAX_IMAGES_BATCH=5
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
VERIFY_TRANSACTION_CHAIN_ID=5
|
||||
VERIFY_ENS_CHAIN_ID=5
|
||||
TEST_STATEOFUS=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
COMMUNITIES_ENABLED=1
|
||||
COMMUNITIES_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
@@ -1,36 +1 @@
|
||||
CACHED_WEBVIEWS_ENABLED=1
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=goerli_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
STATUS_GO_ENABLE_NIMBUS=0
|
||||
COMMANDS_ENABLED=1
|
||||
KEYCARD_TEST_MENU=0
|
||||
ENABLE_ROOT_ALERT=1
|
||||
DISABLE_WALLET_ON_MOBILE_NETWORK=1
|
||||
APN_TOPIC=im.status.ethereum.pr
|
||||
VERIFY_TRANSACTION_CHAIN_ID=5
|
||||
VERIFY_ENS_CHAIN_ID=5
|
||||
TEST_STATEOFUS=1
|
||||
BLANK_PREVIEW=0
|
||||
MAX_IMAGES_BATCH=5
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
COMMUNITIES_ENABLED=1
|
||||
COMMUNITIES_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
TESTFAIRY_ENABLED=1
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
KEYCARD_TEST_MENU=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
ENABLE_ROOT_ALERT=1
|
||||
MAX_IMAGES_BATCH=5
|
||||
BLANK_PREVIEW=0
|
||||
COMMUNITIES_ENABLED=1
|
||||
DATABASE_MANAGEMENT_ENABLED=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
@@ -1,21 +0,0 @@
|
||||
DEBUG_WEBVIEW=0
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ETHEREUM_DEV_CLUSTER=0
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=0
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
KEYCARD_TEST_MENU=0
|
||||
RPC_NETWORKS_ONLY=1
|
||||
PARTITIONED_TOPIC=0
|
||||
ENABLE_ROOT_ALERT=1
|
||||
MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
COLLECTIBLES_ENABLED=1
|
||||
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
@@ -20,78 +20,39 @@
|
||||
|
||||
# Ignore duplicate module providers
|
||||
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
|
||||
node_modules/react-native/Libraries/react-native/React.js
|
||||
.*/Libraries/react-native/React.js
|
||||
.*/Libraries/react-native/ReactNative.js
|
||||
.*/node_modules/jest-runtime/build/__tests__/.*
|
||||
|
||||
; Ignore polyfills
|
||||
node_modules/react-native/Libraries/polyfills/.*
|
||||
|
||||
; These should not be required directly
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
node_modules/warning/.*
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
node_modules/react-native/flow/
|
||||
node_modules/react-native/flow
|
||||
flow/
|
||||
|
||||
[options]
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
module.system=haste
|
||||
|
||||
esproposal.class_static_fields=enable
|
||||
esproposal.class_instance_fields=enable
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.json
|
||||
module.file_ext=.ios.js
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# get basename
|
||||
# get basename
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
|
||||
experimental.strict_type_args=true
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
||||
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
|
||||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.native.js
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.122.0
|
||||
^0.30.0
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
*.pbxproj -text
|
||||
*.patch eol=lf
|
||||
@@ -1,25 +0,0 @@
|
||||
# This is a comment.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
/ci @jakubgs
|
||||
/fastlane @jakubgs
|
||||
/scripts @jakubgs
|
||||
/.env* @jakubgs
|
||||
/.TOOLVERSIONS @jakubgs
|
||||
/STATUS_GO_* @jakubgs
|
||||
|
||||
# Order is important; the last matching pattern takes the most
|
||||
# precedence. When someone opens a pull request that only
|
||||
# modifies Nix files, only @js-owner and not the global
|
||||
# owner(s) will be requested for a review.
|
||||
*.nix @jakubgs
|
||||
/nix @jakubgs
|
||||
/.github/ @jakubgs
|
||||
|
||||
/components @status-im/status-core-ui
|
||||
|
||||
/test/appium/ @churik
|
||||
@@ -8,9 +8,10 @@ These are just guidelines, not rules. Use your best judgment, and feel free to p
|
||||
|
||||
#### What should I know before I get started?
|
||||
|
||||
* [Mission and Principles](https://status.im/about)
|
||||
* [Read our FAQ](https://status.im/docs/FAQs.html)
|
||||
* [Join our Chat](http://join.status.im/chat/public/status-core-dev)
|
||||
* [Developer Introduction](https://status.im/developer_tools/)
|
||||
* [Build Status Yourself](https://status.im/technical/build_status)
|
||||
* [Find issues to work on](https://github.com/status-im/)
|
||||
* [Mission and Core Values](http://wiki.status.im/getting-started/mission-and-core-values/)
|
||||
* [Code of Conduct](http://wiki.status.im/getting-started/code-of-conduct/)
|
||||
* [Read our FAQ](http://wiki.status.im/getting-started/faq/)
|
||||
* [Join our Slack](http://slack.status.im/) and chat in `#dev-status`
|
||||
* [Developer Introduction](http://wiki.status.im/contributing/development/introduction/)
|
||||
* [How to Build Status](http://wiki.status.im/contributing/development/building-status/)
|
||||
* [Finding issues to work on](http://wiki.status.im/contributing/development/introduction/#finding-issues-to-work-on)
|
||||
@@ -1,35 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Bug Report
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
|
||||
## Problem
|
||||
[comment]: # (A problem description)
|
||||
|
||||
|
||||
#### Expected behavior
|
||||
|
||||
|
||||
#### Actual behavior
|
||||
|
||||
|
||||
### Reproduction
|
||||
|
||||
1) Open Status
|
||||
2)
|
||||
|
||||
### Additional Information
|
||||
|
||||
- Status version: nightly
|
||||
- Operating System: Android, iOS
|
||||
|
||||
|
||||
[comment]: # (Please, add logs/notes if necessary)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Feature Issue
|
||||
about: Feature Issue
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Feature Issue
|
||||
|
||||
[comment]: # (Please replace ... with your information. Remove < and >)
|
||||
|
||||
### User Story
|
||||
|
||||
As a <user|developer|...>, I want to <task> **so that** <goal>.
|
||||
|
||||
### Description
|
||||
|
||||
[comment]: # (Describe the feature you would like and include designs and Figma links if available.)
|
||||
[comment]: # (Describe the use cases the implementation should cover. E.g. New users, existing users, public chat, group chat, etc)
|
||||
*Summary*: ...
|
||||
|
||||
### Acceptance Criteria
|
||||
|
||||
[comment]: # (Rules for the future PR to be accepted.)
|
||||
|
||||
### Notes
|
||||
|
||||
[comment]: # (For the developer who will implement. Include planning poker estimates, guidance, etc.)
|
||||
@@ -1,77 +0,0 @@
|
||||
---
|
||||
name: Release umbrella issue
|
||||
about: Release Issue
|
||||
title: 'Mobile release '
|
||||
labels: release
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
Issue to manage mobile release <version>
|
||||
|
||||
### Scope
|
||||
[comment]: # (Add milestone from github)
|
||||
https://github.com/status-im/status-mobile/milestone/
|
||||
|
||||
- release notes:
|
||||
- release branch:
|
||||
|
||||
|
||||
### Testing info
|
||||
[comment]: # (TestRail info, added by QA)
|
||||
Main test suite:
|
||||
Upgrade (e2e):
|
||||
|
||||
### Builds in TestFlight and PlayStore to push as a release
|
||||
[comment]: # (Will be added by QA after testing approving of build)
|
||||
|
||||
### Process
|
||||
#### 1) Kick-off
|
||||
- [ ] 1. Translation PRs is merged before cutting branch (Jinho)
|
||||
- [ ] 2. Prepare scope of visible changes based on commits history, started from previous release branch cut ([guide](https://notes.status.im/how-to-prepare-release-notes))
|
||||
- [ ] 3. Update [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) with release notes (make PR based on previous step)
|
||||
- [ ] 4. Create release branch using this [guide](https://github.com/status-im/status-mobile/blob/develop/doc/RELEASE_GUIDE.md), bump VERSION (merge created PR ([example](https://github.com/status-im/status-mobile/pull/12504) ) to develop) and get successful release builds (so, testing can be started)
|
||||
- [ ] 5. Based on release scope, ask for comms (Jonny)
|
||||
- [ ] 6. Make sure that assets (screenshots, video) in stores are up-to-date, more info [here](https://notes.status.im/how-to-update-assets)
|
||||
|
||||
#### 2) Testing
|
||||
[comment]: # (Section will be maintained by QA)
|
||||
- [ ] Dogfooding (add notes, if it was held)
|
||||
- [ ] Regression testing for release candidate build
|
||||
- [ ] Upgrade tests
|
||||
- [ ] Fix known blocker(s) found during regression testing
|
||||
|
||||
##### Blockers
|
||||
[comment]: # (Section for blocker issues; should be fixed and merged by release-manager. Remove if no blockers found)
|
||||
- [ ] 1 blocker:
|
||||
|
||||
=============================================================================================
|
||||
|
||||
- [ ] Cherry-pick fix(es) to the release branch
|
||||
- [ ] Verify fix(es) on new release candidate build
|
||||
- [ ] Retest
|
||||
- [ ] Keep release build forever (button in Jenkins)
|
||||
|
||||
#### 3) Submission
|
||||
|
||||
- [ ] 1. Prepare PR for F-droid build ([instruction]( https://github.com/status-im/status-mobile/blob/develop/doc/FDROID.md))
|
||||
- [ ] 2. Release notes written and added (500 character limit for updates (Android) and PR for [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) is ready to be merged (from 1.3 step)
|
||||
- [ ] 3. Submit beta version for Android (Open Testing in Play Store)
|
||||
- [ ] 4. Submit iOS build to Apple review ([instruction](https://drive.google.com/file/d/10Cl7PBB7TFPkZiVbfzdFGpfMRP9bxXuq/view?usp=sharing), be careful - low quality of audio)
|
||||
- [ ] 5. Play store content reviewed and updated
|
||||
- [ ] 6. Privacy policy reviewed and updated (ask in channel)
|
||||
- [ ] 7. Countries to be excluded (ask in channel)
|
||||
- [ ] 8. Changes to our FAQ made (should be checked and if any changes needed, ask Jakub to made them)
|
||||
|
||||
|
||||
#### 4) Before publishing
|
||||
- [ ] 1. Translations for comms available (marketing, ask in the channel)
|
||||
- [ ] 2. Promotional content ready (marketing, ask in channel)
|
||||
- [ ] 3. Upload builds for DO store, https://dev.status.im/ (Jakub)
|
||||
|
||||
#### 5) At time of publishing
|
||||
- [ ] 1. Notify marketing to push comms and blog post (Jonny + get review on blog from QA team)
|
||||
- [ ] 2. Publish release to app store and playstore
|
||||
- [ ] 3. Final push to update prod site https://status.im/, [instructions](https://github.com/status-im/infra-docs/blob/master/articles/status_release_upload.md) (Jakub - requires credentials to upload)
|
||||
- [ ] 4. Add the link to the post about the release and publish the release: https://github.com/status-im/status-mobile/releases (Jakub)
|
||||
- [ ] 5. Merge PR for updating [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) (from 1.3 step)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: Simple Issue Report
|
||||
about: Simple issue report.
|
||||
---
|
||||
|
||||
# Problem
|
||||
|
||||
An overview of the background required to understand the problem.
|
||||
A problem description.
|
||||
|
||||
## Implementation
|
||||
|
||||
Known steps towards feature implementation.
|
||||
What needs further specifying and investigating.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
Rules for the future PR to be accepted.
|
||||
|
||||
## Notes
|
||||
|
||||
Random notes to keep in mind while implementing it. Mostly about related issues and future plans and thoughts.
|
||||
|
||||
## Future Steps
|
||||
|
||||
Steps which should be taken after this issue has been resolved.
|
||||
@@ -1,66 +1,16 @@
|
||||
[comment]: # (Please replace ... with your information. Remove < and >)
|
||||
[comment]: # (To auto-close issue on merge, please insert the related issue number after # i.e fixes #566)
|
||||
|
||||
If you submit PR for issue with bounty then write here Fixes #NN where NN is issue number
|
||||
|
||||
*otherwise*
|
||||
|
||||
fixes #...
|
||||
|
||||
### Summary
|
||||
|
||||
### Summary:
|
||||
[comment]: # (Summarise the problem and how the pull request solves it)
|
||||
...
|
||||
|
||||
<!-- (Optional, remove if no changes to documentation) -->
|
||||
Documentation change PR (review please): https://github.com/status-im/status.im/pull/xxx
|
||||
|
||||
### Review notes
|
||||
<!-- (Optional. Specify if something in particular should be looked at, or ignored, during review) -->
|
||||
|
||||
### Testing notes
|
||||
<!-- (Optional) -->
|
||||
|
||||
#### Platforms
|
||||
<!-- (Optional. Specify which platforms should be tested) -->
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- macOS
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
#### Areas that maybe impacted
|
||||
<!-- (Optional. Specify if some specific areas has to be tested, for example 1-1 chats) -->
|
||||
|
||||
##### Functional
|
||||
|
||||
- 1-1 chats
|
||||
- public chats
|
||||
- group chats
|
||||
- wallet / transactions
|
||||
- dapps / app browsing
|
||||
- account recovery
|
||||
- new account
|
||||
- user profile updates
|
||||
- networks
|
||||
- mailservers
|
||||
- fleet
|
||||
- bootnodes
|
||||
|
||||
##### Non-functional
|
||||
|
||||
- battery performance
|
||||
- CPU performance / speed of the app
|
||||
- network consumption
|
||||
|
||||
### Steps to test
|
||||
<!-- (Specify exact steps to test if there are such) -->
|
||||
|
||||
### Steps to test:
|
||||
- Open Status
|
||||
- ...
|
||||
- Step 3, etc.
|
||||
|
||||
<!-- (PRs will only be accepted if squashed into single commit.) -->
|
||||
[comment]: # (PRs will only be accepted if squashed into single commit.)
|
||||
status: <ready|wip>
|
||||
|
||||
status: ready <!-- Can be ready or wip -->
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Set to true to add reviewers to pull requests
|
||||
addReviewers: true
|
||||
|
||||
# Set to true to add assignees to pull requests
|
||||
addAssignees: false
|
||||
|
||||
# A list of reviewers to be added to pull requests (GitHub user name)
|
||||
reviewers:
|
||||
- status-im/status-core
|
||||
|
||||
# A number of reviewers added to the pull request
|
||||
# Set 0 to add all the reviewers (default: 0)
|
||||
numberOfReviewers: 0
|
||||
|
||||
# A list of assignees, overrides reviewers if set
|
||||
# assignees:
|
||||
# - status-im/status-core
|
||||
|
||||
# A number of assignees to add to the pull request
|
||||
# Set to 0 to add all of the assignees.
|
||||
# Uses numberOfReviewers if unset.
|
||||
# numberOfAssignees: 2
|
||||
|
||||
# A list of keywords to be skipped the process that add reviewers if pull requests include it
|
||||
skipKeywords:
|
||||
- wip
|
||||
@@ -1,18 +0,0 @@
|
||||
_extends: probot-settings
|
||||
|
||||
project-board:
|
||||
name: 'Pipeline for QA'
|
||||
min-reviewers: 1
|
||||
tested-pr-label-name: 'Tested - Issues'
|
||||
contributor-column-name: 'CONTRIBUTOR'
|
||||
to-rebase-column-name: 'TO REBASE'
|
||||
review-column-name: 'REVIEW'
|
||||
test-column-name: 'E2E Tests'
|
||||
|
||||
automated-tests:
|
||||
repo-full-name: 'status-im/status-mobile'
|
||||
job-full-name: 'status-mobile/e2e/status-app-prs'
|
||||
kickoff-column-name: 'E2E Tests'
|
||||
|
||||
github-team:
|
||||
slug: 'clojure'
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"recipients": [
|
||||
"jakubgs",
|
||||
"corpetty"
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
daysUntilStale: 90
|
||||
daysUntilClose: 7
|
||||
exemptLabels:
|
||||
- 'wall of shame'
|
||||
- security
|
||||
staleLabel: stale
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
closeComment: >
|
||||
This issue has been automatically closed. Please re-open if this issue
|
||||
is important to you.
|
||||
|
||||
pulls:
|
||||
daysUntilStale: 14
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
# Xcode
|
||||
#
|
||||
result/
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
@@ -30,42 +29,25 @@ project.xcworkspace
|
||||
#
|
||||
.idea
|
||||
.gradle
|
||||
*.iml
|
||||
**/android/.project
|
||||
**/android/.settings/org.eclipse.buildship.core.prefs
|
||||
local.properties
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
|
||||
# VS Code
|
||||
.vscode/
|
||||
workspace.code-workspace
|
||||
status-im.iml
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
node_modules.tmp/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
default.realm/
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
android/app/libs
|
||||
android/app/obj
|
||||
android/keystores/debug.keystore
|
||||
!debug.keystore
|
||||
|
||||
# Generated by clj-rn
|
||||
# Generated by re-natal
|
||||
#
|
||||
index.android.js
|
||||
index.ios.js
|
||||
target/
|
||||
env/dev/env/config.cljs
|
||||
externs/
|
||||
shim.js
|
||||
|
||||
# Generated by lein voom
|
||||
#
|
||||
@@ -82,96 +64,18 @@ figwheel_server.log
|
||||
.lein-failures
|
||||
.lein-repl-history
|
||||
|
||||
# Shadow
|
||||
.shadow-cljs
|
||||
|
||||
## Doo
|
||||
#
|
||||
out
|
||||
doo-index.html
|
||||
|
||||
# Bundler
|
||||
.bundle
|
||||
# Re-natal
|
||||
re-natal
|
||||
|
||||
# Status
|
||||
Statusgo.framework
|
||||
Statusgo.xcframework
|
||||
status-dev-cli
|
||||
|
||||
#ios
|
||||
/ios/Pods/
|
||||
/ios/StatusIm.xcworkspace
|
||||
/ios/react-native-xcode.log
|
||||
/ios/set_xcode_version.log
|
||||
.ruby-version
|
||||
status-e2e/
|
||||
|
||||
#python
|
||||
*.pyc
|
||||
*.cache
|
||||
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/README.md
|
||||
|
||||
# Clj
|
||||
|
||||
.cpcache/
|
||||
|
||||
# emacs
|
||||
.dir-locals.el
|
||||
|
||||
# We don't use NPM
|
||||
/package-lock.json
|
||||
/.re-natal
|
||||
/re-natal
|
||||
|
||||
# Jenkins
|
||||
pkg
|
||||
/BUILD_NUMBER
|
||||
|
||||
# Conan
|
||||
conan*.txt
|
||||
conanbuildinfo.*
|
||||
conan.cmake
|
||||
|
||||
# Env
|
||||
.env.bkp
|
||||
|
||||
# nix
|
||||
/.ran-setup
|
||||
/.nix-gcroots/
|
||||
/result
|
||||
|
||||
# modules
|
||||
status-modules/translations
|
||||
status-modules/cljs
|
||||
status-modules/resources
|
||||
|
||||
## coverage
|
||||
/.nyc_output
|
||||
/coverage-report
|
||||
|
||||
## fiddle
|
||||
/fiddle/node_modules/
|
||||
/fiddle/target/
|
||||
/fiddle/resources/public/images/
|
||||
|
||||
trace.edn
|
||||
|
||||
/app/
|
||||
project.clj
|
||||
|
||||
##appium
|
||||
test/appium/report/
|
||||
result.xml
|
||||
test/appium/tests/users.py
|
||||
|
||||
##node bindings
|
||||
/bin/
|
||||
/lib/
|
||||
ios/Pods
|
||||
ios/StatusIm.xcworkspace
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Andrea Maria Piana <cammellos@cammelloss-MacBook-Pro.local>
|
||||
Aleksandr Pantyukhov <alwxndr@gmail.com>
|
||||
Aleksandr Pantyukhov <me@alwx.me>
|
||||
Anton Danchenko <adan@ciklum.com>
|
||||
Chad Jackson <chad@status.im>
|
||||
Dmitry Shulyak <yashulyak@gmail.com>
|
||||
Eric Dvorsak <yenda1@gmail.com>
|
||||
Eric Dvorsak <eric@dvorsak.fr>
|
||||
Eric Dvorsak <eric@status.im>
|
||||
George Lipov <gnl@lipov.net>
|
||||
Goran Jović <goranjovic@gmail.com>
|
||||
Jan Herich <jan.herich@gmail.com>
|
||||
Jan Herich <ot73589@OT73589M1.local>
|
||||
Jakub Sokołowski <i+github@always.fail>
|
||||
Jarrad Hope <jarrad@Jarrads-iMac.local>
|
||||
Oskar Thorén <ot@oskarthoren.com>
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"include": [
|
||||
"target/test/status_im/**"
|
||||
],
|
||||
"exclude": [
|
||||
"target/test/status_im/test/**",
|
||||
"target/test/status_im/ui/**"
|
||||
],
|
||||
"report-dir": "./coverage-report",
|
||||
"all": true,
|
||||
"source-map": true,
|
||||
"produce-source-map": true,
|
||||
"instrument": true,
|
||||
"exclude-after-remap": false,
|
||||
"extension": [".js"],
|
||||
"reporter": ["lcovonly"]
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
module.exports = {
|
||||
bracketSpacing: false,
|
||||
bracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
tabWidth: 4,
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "StatusIm",
|
||||
"interface": "reagent",
|
||||
"androidHost": "localhost",
|
||||
"modules": [
|
||||
"react-native-contacts",
|
||||
"react-native-invertible-scroll-view",
|
||||
"awesome-phonenumber",
|
||||
"realm",
|
||||
"react-native-i18n",
|
||||
"realm/react-native",
|
||||
"react-native-action-button",
|
||||
"react-native-vector-icons/Ionicons",
|
||||
"react-native-vector-icons/Octicons",
|
||||
"react-native-randombytes",
|
||||
"dismissKeyboard",
|
||||
"react-native-linear-gradient",
|
||||
"react-native-splash-screen",
|
||||
"react-native-android-sms-listener",
|
||||
"react-native-status",
|
||||
"react-native-camera",
|
||||
"react-native-qrcode",
|
||||
"react-native-orientation",
|
||||
"identicon.js",
|
||||
"react-native-fs",
|
||||
"react-native-dialogs",
|
||||
"react-native-popup-menu",
|
||||
"react-native-sortable-listview",
|
||||
"react-native-image-resizer",
|
||||
"react-native-image-crop-picker",
|
||||
"react-native-webview-bridge",
|
||||
"react-native-drawer-layout",
|
||||
"homoglyph-finder",
|
||||
"web3",
|
||||
"eccjs",
|
||||
"chance",
|
||||
"react-native-swiper",
|
||||
"react-native-emoji-picker",
|
||||
"react-native-autolink",
|
||||
"instabug-reactnative",
|
||||
"nfc-react-native",
|
||||
"react-native-http-bridge",
|
||||
"emojilib",
|
||||
"react-native-mapbox-gl",
|
||||
"bignumber.js",
|
||||
"react-native-config"
|
||||
],
|
||||
"imageDirs": [
|
||||
"images"
|
||||
],
|
||||
"iosHost": "10.0.1.4",
|
||||
"envRoots": {
|
||||
"dev": "env/dev",
|
||||
"prod": "env/prod"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1 @@
|
||||
{
|
||||
"ignore_dirs": [
|
||||
"android/build",
|
||||
"target"
|
||||
]
|
||||
}
|
||||
{}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||
|
||||
## [Unreleased][unreleased]
|
||||
### Changed
|
||||
- Add a new arity to `make-widget-async` to provide a different widget shape.
|
||||
|
||||
## [0.1.1] - 2016-03-23
|
||||
### Changed
|
||||
- Documentation on how to make the widgets.
|
||||
|
||||
### Removed
|
||||
- `make-widget-sync` - we're all async, all the time.
|
||||
|
||||
### Fixed
|
||||
- Fixed widget maker to keep working when daylight savings switches over.
|
||||
|
||||
## 0.1.0 - 2016-03-23
|
||||
### Added
|
||||
- Files from the new template.
|
||||
- Widget maker public API - `make-widget-sync`.
|
||||
|
||||
[unreleased]: https://github.com/your-name/status-im/compare/0.1.1...HEAD
|
||||
[0.1.1]: https://github.com/your-name/status-im/compare/0.1.0...0.1.1
|
||||
@@ -0,0 +1,83 @@
|
||||
env.LANG="en_US.UTF-8"
|
||||
env.LANGUAGE="en_US.UTF-8"
|
||||
env.LC_ALL="en_US.UTF-8"
|
||||
node {
|
||||
def apkUrl = ''
|
||||
def ipaUrl = ''
|
||||
def testPassed = true
|
||||
|
||||
sh 'source /etc/profile'
|
||||
|
||||
try {
|
||||
|
||||
stage('Git & Dependencies') {
|
||||
git([url: 'https://github.com/status-im/status-react.git', branch: env.BRANCH_NAME])
|
||||
// Checkout master because used for iOS Plist version information
|
||||
sh 'git checkout -- .'
|
||||
sh 'git checkout master'
|
||||
sh 'git checkout ' + env.BRANCH_NAME
|
||||
sh 'rm -rf node_modules'
|
||||
sh 'cp .env.jenkins .env'
|
||||
sh 'lein deps && npm install && ./re-natal deps'
|
||||
sh 'sed -i "" "s/301000/601000/g" node_modules/react-native/packager/src/JSTransformer/index.js'
|
||||
sh 'lein generate-externs'
|
||||
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'
|
||||
sh 'cd ios && pod install && cd ..'
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
sh 'lein test-cljs'
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
sh 'lein prod-build'
|
||||
}
|
||||
|
||||
// Android
|
||||
stage('Build (Android)') {
|
||||
sh 'cd android && ./gradlew assembleRelease'
|
||||
}
|
||||
stage('Deploy (Android)') {
|
||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||
sh 'sleep 10'
|
||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||
apkUrl = 'https://i.diawi.com/' + hash
|
||||
}
|
||||
}
|
||||
|
||||
// try {
|
||||
// stage('Test (Android)') {
|
||||
// sauce('b9aded57-5cc1-4f6b-b5ea-42d989987852') {
|
||||
// sh 'cd test/appium && mvn -DapkUrl=' + apkUrl + ' test'
|
||||
// saucePublisher()
|
||||
// }
|
||||
// }
|
||||
// } catch(e) {
|
||||
// testPassed = false
|
||||
// }
|
||||
|
||||
// iOS
|
||||
stage('Build (iOS)') {
|
||||
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
||||
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist /Users/Xcloud/archive.plist'
|
||||
}
|
||||
stage('Deploy (iOS)') {
|
||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@status/StatusIm.ipa -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||
sh 'sleep 10'
|
||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||
ipaUrl = 'https://i.diawi.com/' + hash
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
slackSend color: 'bad', message: env.BRANCH_NAME + ' failed to build. ' + env.BUILD_URL
|
||||
throw e
|
||||
}
|
||||
|
||||
stage('Slack Notification') {
|
||||
def c = (testPassed ? 'good' : 'warning' )
|
||||
slackSend color: c, message: 'Branch: ' + env.BRANCH_NAME + '\nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
|
||||
}
|
||||
}
|
||||
@@ -1,362 +0,0 @@
|
||||
.PHONY: nix-add-gcroots clean nix-clean run-metro test release _list _fix-node-perms _tmpdir-mk _tmpdir-rm _install-hooks
|
||||
|
||||
help: SHELL := /bin/sh
|
||||
help: ##@other Show this help
|
||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||
|
||||
# This is a code for automatic help generator.
|
||||
# It supports ANSI colors and categories.
|
||||
# To add new item into help output, simply add comments
|
||||
# starting with '##'. To add category, use @category.
|
||||
GREEN := $(shell tput -Txterm setaf 2)
|
||||
RED := $(shell tput -Txterm setaf 1)
|
||||
WHITE := $(shell tput -Txterm setaf 7)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
HELP_FUN = \
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# This can come from Jenkins
|
||||
ifndef BUILD_TAG
|
||||
export BUILD_TAG := $(shell git rev-parse --short HEAD)
|
||||
endif
|
||||
|
||||
# We don't want to use /run/user/$UID because it runs out of space too easilly.
|
||||
export TMPDIR = /tmp/tmp-status-mobile-$(BUILD_TAG)
|
||||
# This has to be specified for both the Node.JS server process and the Qt process.
|
||||
export REACT_SERVER_PORT ?= 5001
|
||||
# Fix for ERR_OSSL_EVP_UNSUPPORTED error.
|
||||
export NODE_OPTIONS += --openssl-legacy-provider
|
||||
# The path can be anything, but home is usually safest.
|
||||
export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
|
||||
# Our custom config is located in nix/nix.conf
|
||||
export NIX_CONF_DIR = $(PWD)/nix
|
||||
# Location of symlinks to derivations that should not be garbage collected
|
||||
export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-mobile
|
||||
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
|
||||
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE
|
||||
|
||||
# Useful for Andoird release builds
|
||||
TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10)
|
||||
|
||||
# MacOS root is read-only, read nix/README.md for details
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
export NIX_IGNORE_SYMLINK_STORE=1
|
||||
endif
|
||||
|
||||
#----------------
|
||||
# Nix targets
|
||||
#----------------
|
||||
|
||||
# WARNING: This has to be located right before all the targets.
|
||||
SHELL := ./nix/scripts/shell.sh
|
||||
|
||||
shell: export TARGET ?= default
|
||||
shell: ##@prepare Enter into a pre-configured shell
|
||||
ifndef IN_NIX_SHELL
|
||||
@ENTER_NIX_SHELL
|
||||
else
|
||||
@echo "${YELLOW}Nix shell is already active$(RESET)"
|
||||
endif
|
||||
|
||||
nix-repl: SHELL := /bin/sh
|
||||
nix-repl: ##@nix Start an interactive Nix REPL
|
||||
nix repl default.nix
|
||||
|
||||
nix-gc-protected: SHELL := /bin/sh
|
||||
nix-gc-protected:
|
||||
@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
|
||||
ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
|
||||
|
||||
nix-gc: export TARGET := nix
|
||||
nix-gc: nix-gc-protected ##@nix Garbage collect all packages older than 20 days from /nix/store
|
||||
nix-store --gc
|
||||
|
||||
nix-clean: export TARGET := default
|
||||
nix-clean: ##@nix Remove all status-mobile build artifacts from /nix/store
|
||||
nix/scripts/clean.sh
|
||||
|
||||
nix-purge: SHELL := /bin/sh
|
||||
nix-purge: ##@nix Completely remove Nix setup, including /nix directory
|
||||
nix/scripts/purge.sh
|
||||
|
||||
nix-update-gradle: export TARGET := gradle
|
||||
nix-update-gradle: ##@nix Update maven nix expressions based on current gradle setup
|
||||
nix/deps/gradle/generate.sh
|
||||
|
||||
nix-update-clojure: export TARGET := clojure
|
||||
nix-update-clojure: ##@nix Update maven Nix expressions based on current clojure setup
|
||||
nix/deps/clojure/generate.sh
|
||||
|
||||
nix-update-gems: export TARGET := default
|
||||
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
|
||||
fastlane/update.sh
|
||||
|
||||
nix-update-pods: export TARGET := ios
|
||||
nix-update-pods: ##@nix Update CocoaPods in ios/Podfile.lock
|
||||
cd ios && pod update
|
||||
|
||||
#----------------
|
||||
# General targets
|
||||
#----------------
|
||||
|
||||
_fix-node-perms: SHELL := /bin/sh
|
||||
_fix-node-perms: ##@prepare Fix permissions so that directory can be cleaned
|
||||
$(shell test -d node_modules && chmod -R 744 node_modules)
|
||||
$(shell test -d node_modules.tmp && chmod -R 744 node_modules.tmp)
|
||||
|
||||
_tmpdir-mk: SHELL := /bin/sh
|
||||
_tmpdir-mk: ##@prepare Create a TMPDIR for temporary files
|
||||
@mkdir -p "$(TMPDIR)"
|
||||
# Make sure TMPDIR exists every time make is called
|
||||
-include _tmpdir-mk
|
||||
|
||||
_tmpdir-rm: SHELL := /bin/sh
|
||||
_tmpdir-rm: ##@prepare Remove TMPDIR
|
||||
rm -fr "$(TMPDIR)"
|
||||
|
||||
_install-hooks: SHELL := /bin/sh
|
||||
_install-hooks: ##@prepare Create prepare-commit-msg git hook symlink
|
||||
@ln -s -f ../../scripts/hooks/prepare-commit-msg .git/hooks
|
||||
-include _install-hooks
|
||||
|
||||
# Remove directories and ignored files
|
||||
clean: SHELL := /bin/sh
|
||||
clean: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
|
||||
git clean -dXf
|
||||
|
||||
# Remove directories, ignored and non-ignored files
|
||||
purge: SHELL := /bin/sh
|
||||
purge: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
|
||||
git clean -dxf
|
||||
|
||||
|
||||
watchman-clean: export TARGET := watchman
|
||||
watchman-clean: ##@prepare Delete repo directory from watchman
|
||||
watchman watch-del $${STATUS_MOBILE_HOME}
|
||||
|
||||
pod-install: export TARGET := ios
|
||||
pod-install: ##@prepare Run 'pod install' to install podfiles and update Podfile.lock
|
||||
cd ios && pod install; cd --
|
||||
|
||||
update-fleets: ##@prepare Download up-to-date JSON file with current fleets state
|
||||
curl -s https://fleets.status.im/ \
|
||||
| jq --indent 4 --sort-keys . \
|
||||
> resources/config/fleets.json
|
||||
|
||||
$(KEYSTORE_PATH): export TARGET := keytool
|
||||
$(KEYSTORE_PATH):
|
||||
@./scripts/generate-keystore.sh
|
||||
|
||||
keystore: $(KEYSTORE_PATH) ##@prepare Generate a Keystore for signing Android APKs
|
||||
|
||||
fdroid-max-watches: SHELL := /bin/sh
|
||||
fdroid-max-watches: ##@prepare Bump max_user_watches to avoid ENOSPC errors
|
||||
sysctl fs.inotify.max_user_watches=524288
|
||||
|
||||
fdroid-nix-dir: SHELL := /bin/sh
|
||||
fdroid-nix-dir: ##@prepare Create /nix directory for F-Droid Vagrant builders
|
||||
mkdir -m 0755 /nix
|
||||
chown vagrant /nix
|
||||
|
||||
fdroid-fix-tmp: SHELL := /bin/sh
|
||||
fdroid-fix-tmp: ##@prepare Fix TMPDIR permissions so Vagrant user is the owner
|
||||
chown -R vagrant "$(TMPDIR)"
|
||||
|
||||
fdroid-build-env: fdroid-max-watches fdroid-nix-dir fdroid-fix-tmp ##@prepare Setup build environment for F-Droud build
|
||||
|
||||
fdroid-pr: export TARGET := android-sdk
|
||||
fdroid-pr: ##@prepare Create F-Droid release PR
|
||||
ifndef APK
|
||||
$(error APK env var not defined)
|
||||
endif
|
||||
scripts/fdroid-pr.sh "$(APK)"
|
||||
|
||||
xcode-clean: SHELL := /bin/sh
|
||||
xcode-clean: XCODE_HOME := $(HOME)/Library/Developer/Xcode
|
||||
xcode-clean: ##@prepare Clean XCode derived data and archives
|
||||
rm -fr $(XCODE_HOME)/DerivedData/StatusIm-* $(XCODE_HOME)/Archives/*/StatusIm*
|
||||
|
||||
#----------------
|
||||
# Release builds
|
||||
#----------------
|
||||
release: release-android release-ios ##@build Build release for Android and iOS
|
||||
|
||||
build-fdroid: export BUILD_ENV = prod
|
||||
build-fdroid: export BUILD_TYPE = release
|
||||
build-fdroid: export ANDROID_ABI_SPLIT = false
|
||||
build-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64
|
||||
build-fdroid: ##@build Build release for F-Droid
|
||||
@scripts/build-android.sh
|
||||
|
||||
build-android: export BUILD_ENV ?= prod
|
||||
build-android: export BUILD_TYPE ?= nightly
|
||||
build-android: export BUILD_NUMBER ?= $(TMP_BUILD_NUMBER)
|
||||
build-android: export ANDROID_ABI_SPLIT ?= false
|
||||
build-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
|
||||
build-android: ##@build Build unsigned Android APK
|
||||
@scripts/build-android.sh
|
||||
|
||||
release-android: export TARGET := keytool
|
||||
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
release-android: keystore build-android ##@build Build signed Android APK
|
||||
@scripts/sign-android.sh result/app-release-unsigned.apk
|
||||
|
||||
release-ios: export TARGET := ios
|
||||
release-ios: export BUILD_ENV ?= prod
|
||||
release-ios: watchman-clean ##@build Build release for iOS release
|
||||
@git clean -dxf -f target/ios && \
|
||||
$(MAKE) jsbundle-ios && \
|
||||
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive
|
||||
|
||||
jsbundle-android: SHELL := /bin/sh
|
||||
jsbundle-android: export TARGET := android
|
||||
jsbundle-android: export BUILD_ENV ?= prod
|
||||
jsbundle-android: ##@jsbundle Compile JavaScript and Clojurescript into app directory
|
||||
# Call nix-build to build the 'targets.mobile.android.jsbundle' attribute and copy the.js files to the project root
|
||||
nix/scripts/build.sh targets.mobile.android.jsbundle && \
|
||||
mv result/*.js ./
|
||||
|
||||
jsbundle-ios: export TARGET := ios
|
||||
jsbundle-ios: export BUILD_ENV ?= prod
|
||||
jsbundle-ios: ##@jsbundle Compile JavaScript and Clojure into index.ios.js
|
||||
yarn shadow-cljs release mobile
|
||||
|
||||
#--------------
|
||||
# status-go lib
|
||||
#--------------
|
||||
|
||||
status-go-android: SHELL := /bin/sh
|
||||
status-go-android: ##@status-go Compile status-go for Android app
|
||||
nix/scripts/build.sh targets.status-go.mobile.android
|
||||
|
||||
status-go-ios: SHELL := /bin/sh
|
||||
status-go-ios: ##@status-go Compile status-go for iOS app
|
||||
nix/scripts/build.sh targets.status-go.mobile.ios
|
||||
|
||||
status-go-library: SHELL := /bin/sh
|
||||
status-go-library: ##@status-go Compile status-go for node-js
|
||||
nix/scripts/build.sh targets.status-go.library
|
||||
|
||||
#--------------
|
||||
# Watch, Build & Review changes
|
||||
#--------------
|
||||
|
||||
run-clojure: export TARGET := clojure
|
||||
run-clojure: ##@run Watch for and build Clojure changes for mobile
|
||||
yarn shadow-cljs watch mobile
|
||||
|
||||
run-metro: export TARGET := clojure
|
||||
run-metro: ##@run Start Metro to build React Native changes
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
run-re-frisk: export TARGET := clojure
|
||||
run-re-frisk: ##@run Start re-frisk server
|
||||
yarn shadow-cljs run re-frisk-remote.core/start
|
||||
|
||||
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
|
||||
run-android: export TARGET := android
|
||||
run-android: ##@run Build Android APK and start it on the device
|
||||
npx react-native run-android --appIdSuffix debug
|
||||
|
||||
SIMULATOR=iPhone 13
|
||||
run-ios: export TARGET := ios
|
||||
run-ios: ##@run Build iOS app and start it in a simulator/device
|
||||
ifneq ("$(SIMULATOR)", "")
|
||||
npx react-native run-ios --simulator="$(SIMULATOR)"
|
||||
else
|
||||
npx react-native run-ios
|
||||
endif
|
||||
|
||||
#--------------
|
||||
# Tests
|
||||
#--------------
|
||||
|
||||
lint: export TARGET := clojure
|
||||
lint: ##@test Run code style checks
|
||||
sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --lint src && \
|
||||
TARGETS=$$(git diff --diff-filter=d --cached --name-only src && echo src) && \
|
||||
clojure -Scp "$$CLASS_PATH" -m cljfmt.main check --indents indentation.edn $$TARGETS
|
||||
|
||||
lint-fix: export TARGET := clojure
|
||||
lint-fix: ##@test Run code style checks and fix issues
|
||||
clojure -Scp "$$CLASS_PATH" -m cljfmt.main fix src --indents indentation.edn
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
yarn shadow-cljs server
|
||||
|
||||
test-watch: export TARGET := clojure
|
||||
test-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
yarn install
|
||||
nodemon --exec 'yarn shadow-cljs compile mocks && yarn shadow-cljs compile test && node --require ./test-resources/override.js target/test/test.js' -e cljs
|
||||
|
||||
test: export TARGET := clojure
|
||||
test: ##@test Run tests once in NodeJS
|
||||
# Here we creates the gyp bindings for nodejs
|
||||
yarn install
|
||||
yarn shadow-cljs compile mocks && \
|
||||
yarn shadow-cljs compile test && \
|
||||
node --require ./test-resources/override.js target/test/test.js
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
|
||||
geth-connect: export TARGET := android-sdk
|
||||
geth-connect: ##@other Connect to Geth on the device
|
||||
adb forward tcp:8545 tcp:8545 && \
|
||||
build/bin/geth attach http://localhost:8545
|
||||
|
||||
android-clean: export TARGET := gradle
|
||||
android-clean: ##@prepare Clean Gradle state
|
||||
git clean -dxf -f ./android/app/build; \
|
||||
[[ -d android/.gradle ]] && cd android && ./gradlew clean
|
||||
|
||||
android-ports: export TARGET := android-sdk
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb forward tcp:5561 tcp:5561
|
||||
|
||||
android-devices: export TARGET := android-sdk
|
||||
android-devices: ##@other Invoke adb devices
|
||||
adb devices
|
||||
|
||||
android-logcat: export TARGET := android-sdk
|
||||
android-logcat: ##@other Read status-mobile logs from Android phone using adb
|
||||
adb logcat | grep -e RNBootstrap -e ReactNativeJS -e ReactNative -e StatusModule -e StatusNativeLogs -e 'F DEBUG :' -e 'Go :' -e 'GoLog :' -e 'libc :'
|
||||
|
||||
android-install: export TARGET := android-sdk
|
||||
android-install: export BUILD_TYPE ?= release
|
||||
android-install: ##@other Install APK on device using adb
|
||||
adb install result/app-$(BUILD_TYPE).apk
|
||||
|
||||
_list: SHELL := /bin/sh
|
||||
_list:
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||
|
||||
#--------------
|
||||
# REPLs
|
||||
#--------------
|
||||
|
||||
repl-clojure: export TARGET := clojure
|
||||
repl-clojure: ##@repl Start Clojure repl for mobile App
|
||||
yarn shadow-cljs cljs-repl mobile
|
||||
|
||||
repl-nix: nix-repl ##@repl Start an interactive Nix REPL
|
||||
@@ -1,79 +1,96 @@
|
||||
# Status - a Mobile Ethereum Operating System
|
||||

|
||||
[](https://saucelabs.com/beta/builds/50ccf11ec1a44d88b6eb989929e5789f)
|
||||
|
||||
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/>](https://play.google.com/store/apps/details?id=im.status.ethereum)
|
||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/>](https://f-droid.org/packages/im.status.ethereum/)
|
||||
[<img src="doc/github_badge.png" alt="Get it on Github" height="80"/>](https://github.com/status-im/status-mobile/releases)
|
||||
# Status - a Mobile Ethereum Operating System
|
||||
|
||||
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.
|
||||
|
||||
[](https://www.youtube.com/watch?v=oDCSEmS9c3o "Getting started with Status")
|
||||
|
||||
|
||||
## Why?
|
||||
|
||||
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
|
||||
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
|
||||
|
||||
We want to take responsibility for our data, the way we conduct ourselves privately and promote this way of life to a mass audience.
|
||||
|
||||
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provides us a path forward.
|
||||
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provides us a path forward.
|
||||
|
||||
If this interests you, **help us make Status a reality** - anyone can contribute and we need everyone at any skill level to participate.
|
||||
|
||||
## How to Contribute?
|
||||
|
||||
Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
|
||||
Go straight to the [wiki](https://wiki.status.im) or [join our Slack](http://slack.status.im) or choose what interests you:
|
||||
|
||||
- **Developer** Developers are the heart of software and to keep Status beating
|
||||
we need all the help we can get! If you're looking to code in ClojureScript or
|
||||
Golang then Status is the project for you! We use React Native and there is even
|
||||
some Java/Objective-C too! Want to learn more about it? Start by reading our
|
||||
[Developer Introduction](https://status.im/developer_tools/) which guides you
|
||||
through the technology stack and start browsing [beginner
|
||||
issues](https://github.com/status-im/status-mobile/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20).
|
||||
Then you can read how to [Build
|
||||
Status](https://status.im/technical/build_status/), which talks about managing
|
||||
project dependencies, coding guidelines and testing procedures. The [doc/](doc/)
|
||||
directory also has valuable information for contributors.
|
||||
- **Developer**
|
||||
Developers are the heart of software and to keep Status beating we need all the help we can get! If you're looking to code in ClojureScript or Golang then Status is the project for you! We use React Native and there is even some Java/Objective-C too!
|
||||
Want to learn more about it? Start by reading our [Developer Introduction](http://wiki.status.im/contributing/development/introduction/) which guides you through the technology stack and and start browsing [beginner issues](https://github.com/status-im/status-react/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner). Then you can read how to [Build Status](http://wiki.status.im/contributing/development/building-status/), which talks about managing project dependencies, coding guidelines and testing procedures.
|
||||
|
||||
- **Community Management**
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
|
||||
- **Community Management**
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes alot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Community Development Guide](https://wiki.status.im/community/how-to-grow-our-community/)
|
||||
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [wiki](https://wiki.status.im) and see how you can improve what we have.
|
||||
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump on our Slack](http://slack.status.im) and discuss with Carl how you can contribute.
|
||||
|
||||
- **Testers**
|
||||
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](https://status.im/technical/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
- **Marketing**
|
||||
In this day and age attention is limited, we need all the help we can get to find people who are interested in Status, whether that is paid user acquisition, public relations or hype building, check out our [Community Outreach and Marketing Guide](http://wiki.status.im/contributing/outreach/) to see how you can spread the word.
|
||||
|
||||
- **Security**
|
||||
- **Testers**
|
||||
It's bug hunting season! Status is currently in Alpha and there are sure to be a bunch of education, [grab your fresh copy of Status](http://wiki.status.im/contributing/development/building-status/) and shake your phone to submit bug reports, or start browsing our [Github Issues](http://github.com/status-im/status-react/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
|
||||
- **Security**
|
||||
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
|
||||
|
||||
- **Evangelism**
|
||||
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
|
||||
- **Design & User Experience**
|
||||
It's all about that sex appeal, we want cryptocurrencies to be easy and fun to use, ugly software doesn't help adoption. [Check out our designs](http://wiki.status.im/contributing/design-guidelines/) and show us how to make them better!
|
||||
|
||||
## Status API
|
||||
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).
|
||||
- **Evangelism**
|
||||
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts!
|
||||
|
||||
## Give me Binaries!
|
||||
|
||||
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
|
||||
Currently the fastest way to get your hands on a binary is to join our Early Access by submitting your email on our [website](https://status.im) or by [building it yourself](https://wiki.status.im/contributing/development/building-status/).
|
||||
|
||||
// TODO GPlay, TestFlight Instructions & FDroid
|
||||
|
||||
## Core Contributors
|
||||
|
||||
[Core Team Members](https://github.com/orgs/status-im/people)
|
||||
<img src="https://status.im/img/new-site/jarrad.png" width="80px"></img>
|
||||
Jarrad ([@jarradh](https://github.com/jarradh)) - Cofounder and Thought Leader.
|
||||
|
||||
<img src="https://status.im/img/new-site/carl.png" width="80px"></img>
|
||||
Carl ([@carlbennetts](https://github.com/carlbennetts)) - Cofounder and Communications & Marketing.
|
||||
|
||||
<img src="https://status.im/img/new-site/roman.png" width="80px"></img>
|
||||
Roman ([@rasom](https://github.com/rasom)) - Clojure and project lead.
|
||||
|
||||
<img src="https://status.im/img/new-site/alexander.png" width="80px"></img>
|
||||
Alexander ([@alwx](https://github.com/alwx)) - Clojure ninja!
|
||||
|
||||
<img src="https://status.im/img/new-site/andrey.png" width="80px"></img>
|
||||
Andrey ([@flexsurfer](https://github.com/flexsurfer)) - Clojure.
|
||||
|
||||
<img src="https://status.im/img/new-site/gustavo.png" width="80px"></img>
|
||||
Gustavo ([@GustavoNunes](https://github.com/GustavoNunes)) - Clojure.
|
||||
|
||||
<img src="https://status.im/img/new-site/victor.png" width="80px"></img>
|
||||
Victor ([@farazdagi](https://github.com/farazdagi)) - Golang one-man-army.
|
||||
|
||||
<img src="https://status.im/img/new-site/andrei.png" width="80px"></img>
|
||||
Andrei ([@andmironov](https://github.com/andmironov)) - Visual design and user experience conjurer.
|
||||
|
||||
Special thanks to [@adrian-tiberius](https://github.com/adrian-tiberius).
|
||||
Without the dedication of these outstanding individuals, Status would not exist.
|
||||
Without the dedication of these fine gentleman, Status would not exist.
|
||||
|
||||
## Contact us
|
||||
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our Slack](http://slack.status.im).
|
||||
|
||||
Got a feature request or suggestion, download Status and shake your phone, failing that search our [Github Issues](http://github.com/status-im/status-react/issues).
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-mobile/blob/develop/LICENSE.md)
|
||||
|
||||
## Testing Supported by
|
||||
|
||||
[](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
|
||||
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-react/blob/develop/LICENSE.md)
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
import re
|
||||
|
||||
# To learn about Buck see [Docs](https://buckbuild.com/).
|
||||
# To run your application with Buck:
|
||||
# - install Buck
|
||||
# - `npm start` - to start the packager
|
||||
# - `cd android`
|
||||
# - `cp ~/.android/debug.keystore keystores/debug.keystore`
|
||||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
|
||||
# - `buck install -r android/app` - compile, install and run application
|
||||
#
|
||||
|
||||
lib_deps = []
|
||||
for jarfile in glob(['libs/*.jar']):
|
||||
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
|
||||
lib_deps.append(':' + name)
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
binary_jar = jarfile,
|
||||
)
|
||||
|
||||
for aarfile in glob(['libs/*.aar']):
|
||||
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
|
||||
lib_deps.append(':' + name)
|
||||
android_prebuilt_aar(
|
||||
name = name,
|
||||
aar = aarfile,
|
||||
)
|
||||
|
||||
android_library(
|
||||
name = 'all-libs',
|
||||
exported_deps = lib_deps
|
||||
)
|
||||
|
||||
android_library(
|
||||
name = 'app-code',
|
||||
srcs = glob([
|
||||
'src/main/java/**/*.java',
|
||||
]),
|
||||
deps = [
|
||||
':all-libs',
|
||||
':build_config',
|
||||
':res',
|
||||
],
|
||||
)
|
||||
|
||||
android_build_config(
|
||||
name = 'build_config',
|
||||
package = 'im.status.ethereum',
|
||||
)
|
||||
|
||||
android_resource(
|
||||
name = 'res',
|
||||
res = 'src/main/res',
|
||||
package = 'im.status.ethereum',
|
||||
)
|
||||
|
||||
android_binary(
|
||||
name = 'app',
|
||||
package_type = 'debug',
|
||||
manifest = 'src/main/AndroidManifest.xml',
|
||||
keystore = '//android/keystores:debug',
|
||||
deps = [
|
||||
':app-code',
|
||||
],
|
||||
)
|
||||
@@ -3,13 +3,10 @@ apply plugin: "com.android.application"
|
||||
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
|
||||
|
||||
import com.android.build.OutputFile
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
|
||||
/**
|
||||
* The react.gradle file registers a task for each build variant:
|
||||
* - bundlePrJsAndAssets
|
||||
* - bundleDebugJsAndAssets
|
||||
* - bundleReleaseJsAndAssets
|
||||
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
||||
* and bundleReleaseJsAndAssets).
|
||||
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||
* bundle directly from the development server. Below you can see all the possible configurations
|
||||
@@ -21,7 +18,7 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
* bundleAssetName: "index.android.bundle",
|
||||
*
|
||||
* // the entry file for bundle generation
|
||||
* entryFile: "index.js",
|
||||
* entryFile: "index.android.js",
|
||||
*
|
||||
* // whether to bundle JS and assets in debug mode
|
||||
* bundleInDebug: false,
|
||||
@@ -38,13 +35,6 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
* // bundleInPaidRelease: true,
|
||||
* // bundleInBeta: true,
|
||||
*
|
||||
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
||||
* // for example: to disable dev mode in the staging build type (if configured)
|
||||
* devDisabledInStaging: true,
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'devDisabledIn${productFlavor}${buildType}'
|
||||
* // 'devDisabledIn${buildType}'
|
||||
*
|
||||
* // the root of your project, i.e. where "package.json" lives
|
||||
* root: "../../",
|
||||
*
|
||||
@@ -67,88 +57,35 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||
* // for example, you might want to remove it from here.
|
||||
* inputExcludes: ["android/**", "ios/**"],
|
||||
*
|
||||
* // override which node gets called and with what additional arguments
|
||||
* nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"],
|
||||
*
|
||||
* // supply additional arguments to the packager
|
||||
* extraPackagerArgs: []
|
||||
* inputExcludes: ["android/**", "ios/**"]
|
||||
* ]
|
||||
*/
|
||||
|
||||
/*
|
||||
Enabling Hermes on x86 devices is crashing the app after a few reloads,
|
||||
this flag can be used to disable Hermes while building app.
|
||||
https://github.com/status-im/status-mobile/issues/14031
|
||||
*/
|
||||
|
||||
def disableHermes = System.getenv('DISABLE_HERMES') == 'true'
|
||||
|
||||
project.ext.react = [
|
||||
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
|
||||
entryFile: "index.js",
|
||||
/* NOTE: Hermes engine is required for Android 64-bit builds running on 64 devices,
|
||||
* to guard against a hang in the UI thread after invoking status-go.
|
||||
* Also a clean and rebuild is required when changing this. */
|
||||
enableHermes: !disableHermes,
|
||||
/* Disable 'The first definition was here.' warnings */
|
||||
hermesFlagsRelease: ["-w"],
|
||||
bundleInPr: true,
|
||||
inputExcludes: ["android/**", "ios/**", "react-native/**", "src/**", "test/**"]
|
||||
nodeExecutableAndArgs: ["node", "--max-old-space-size=4096"]
|
||||
]
|
||||
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
// configurations.all {
|
||||
// exclude group: 'com.facebook.react', module: 'react-native'
|
||||
// }
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
* - An APK that only works on ARM devices
|
||||
* - An APK that only works on x86 devices
|
||||
* The advantage is the size of the APK is reduced by about 4MB.
|
||||
* Upload all the APKs to the Play Store and people will download
|
||||
* the correct one based on the CPU architecture of their device.
|
||||
*/
|
||||
def enableSeparateBuildPerCPUArchitecture = false
|
||||
|
||||
/**
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
/**
|
||||
* The preferred build flavor of JavaScriptCore.
|
||||
*
|
||||
* For example, to use the international variant, you can use:
|
||||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||
*
|
||||
* The international variant includes ICU i18n library and necessary data
|
||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||
* give correct results when using with locales other than en-US. Note that
|
||||
* this variant is about 6MiB larger per architecture than default.
|
||||
*/
|
||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
|
||||
/**
|
||||
* Whether to enable the Hermes VM.
|
||||
*
|
||||
* This should be set on project.ext.react and mirrored here. If it is not set
|
||||
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||
*/
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
def getCommitHash = { ->
|
||||
if (project.hasProperty("commitHash")) {
|
||||
return project.commitHash
|
||||
}
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
def getVersionCode = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("versionCode")) {
|
||||
return project.versionCode.toString().toInteger()
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine "bash", "../../scripts/version/build_no.sh"
|
||||
commandLine "git", "rev-list", "--count", "HEAD"
|
||||
standardOutput = stdOut
|
||||
errorOutput = System.err
|
||||
}
|
||||
return stdOut.toString().toInteger()
|
||||
}
|
||||
@@ -156,230 +93,108 @@ def getVersionCode = { ->
|
||||
|
||||
def getVersionName = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("releaseVersion")) {
|
||||
return project.releaseVersion
|
||||
exec {
|
||||
commandLine "git", "describe", "--tags", "--always", "--dirty=+"
|
||||
standardOutput = stdOut
|
||||
}
|
||||
/* Necessary because Android Studio uses wrong PWD.
|
||||
* Is actually absolute directory path of this file. */
|
||||
def configDir = project.projectDir.toString()
|
||||
version = new File(configDir + '/../../VERSION').text
|
||||
return version.replaceAll("\\s","")
|
||||
return stdOut.toString().replaceAll("\\s","")
|
||||
}
|
||||
}
|
||||
|
||||
def getBuildUrl = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("buildUrl")) {
|
||||
return project.buildUrl
|
||||
}
|
||||
return 'Local Build'
|
||||
}
|
||||
}
|
||||
|
||||
/* check if environment variable exists for given variable name first */
|
||||
def getEnvOrConfig = { varName ->
|
||||
def val = System.getenv(varName) ? System.getenv(varName) : project.property(varName)
|
||||
return val
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "23.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "im.status.ethereum"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
minSdkVersion 18
|
||||
targetSdkVersion 23
|
||||
multiDexEnabled true
|
||||
versionCode getVersionCode()
|
||||
versionName getVersionName()
|
||||
missingDimensionStrategy 'react-native-camera', 'general'
|
||||
manifestPlaceholders = [commitHash: getCommitHash()]
|
||||
/* this needs to be empty if we want APKs split by ABIs */
|
||||
if (!getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()) {
|
||||
ndk {
|
||||
abiFilters getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||
}
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Arbitrary project metadata
|
||||
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
|
||||
**/
|
||||
project.ext {
|
||||
buildUrl = getBuildUrl()
|
||||
}
|
||||
/**
|
||||
* Fix for: (https://github.com/ReactiveX/RxJava/issues/4445)
|
||||
* Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
|
||||
* > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException:
|
||||
* Duplicate files copied in APK META-INF/rxjava.properties
|
||||
*/
|
||||
packagingOptions {
|
||||
exclude 'META-INF/rxjava.properties'
|
||||
exclude '/lib/mips64/**'
|
||||
exclude '/lib/armeabi/**'
|
||||
|
||||
pickFirst '**/armeabi-v7a/libc++_shared.so'
|
||||
pickFirst '**/x86/libc++_shared.so'
|
||||
pickFirst '**/arm64-v8a/libc++_shared.so'
|
||||
pickFirst '**/x86_64/libc++_shared.so'
|
||||
pickFirst '**/x86/libjsc.so'
|
||||
pickFirst '**/armeabi-v7a/libjsc.so'
|
||||
|
||||
/** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
|
||||
* with recent version of ndk (17.0.4754217)
|
||||
*/
|
||||
doNotStrip '*/mips/*.so'
|
||||
doNotStrip '*/mips64/*.so'
|
||||
}
|
||||
dexOptions {
|
||||
jumboMode true
|
||||
javaMaxHeapSize "8g"
|
||||
javaMaxHeapSize "4g"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(STATUS_RELEASE_STORE_FILE)
|
||||
storePassword STATUS_RELEASE_STORE_PASSWORD
|
||||
keyAlias STATUS_RELEASE_KEY_ALIAS
|
||||
keyPassword STATUS_RELEASE_KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
reset()
|
||||
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
|
||||
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('debug.keystore')
|
||||
storePassword 'android'
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
enable enableSeparateBuildPerCPUArchitecture
|
||||
universalApk false // If true, also generate a universal APK
|
||||
include "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
debuggable true
|
||||
versionNameSuffix "-SNAPSHOT"
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
signingConfig signingConfigs.debug
|
||||
versionNameSuffix "-SNAPSHOT"
|
||||
}
|
||||
release {
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
signingConfig null
|
||||
}
|
||||
pr {
|
||||
initWith release
|
||||
applicationIdSuffix ".pr"
|
||||
versionNameSuffix ".pr"
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
// For each separate APK per architecture, set a unique version code as described here:
|
||||
|
||||
// https://developer.android.com/studio/build/configure-apk-splits.html
|
||||
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||
def versionCodes = ["armeabi-v7a":1, "x86":2]
|
||||
def abi = output.getFilter(OutputFile.ABI)
|
||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||
output.versionCodeOverride = versionCodes.get(abi) + defaultConfig.versionCode
|
||||
output.versionCodeOverride =
|
||||
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
// disable PNG optimization as for some reason it cannot be trusted to provide deterministic output (see https://f-droid.org/en/docs/Reproducible_Builds/)
|
||||
cruncherEnabled = false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main { jniLibs.srcDirs 'libs' }
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
compile project(':react-native-http-bridge')
|
||||
compile project(':nfc-react-native')
|
||||
compile project(':instabug-reactnative')
|
||||
compile project(':react-native-splash-screen')
|
||||
compile project(':react-native-image-resizer')
|
||||
compile project(':react-native-dialogs')
|
||||
compile project(':react-native-randombytes')
|
||||
compile project(':react-native-android-sms-listener')
|
||||
compile project(':realm')
|
||||
compile project(':react-native-vector-icons')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:+" // From node_modules
|
||||
compile project(':react-native-contacts')
|
||||
compile project(':react-native-i18n')
|
||||
compile project(':react-native-linear-gradient')
|
||||
compile project(':react-native-camera')
|
||||
compile project(':react-native-status')
|
||||
compile project(':react-native-orientation')
|
||||
compile project(':react-native-fs')
|
||||
compile project(':react-native-image-crop-picker')
|
||||
compile project(':react-native-webview-bridge')
|
||||
compile project(':reactnativemapboxgl')
|
||||
compile 'testfairy:testfairy-android-sdk:1.+@aar'
|
||||
compile project(':react-native-config')
|
||||
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||
// exclude group:'com.facebook.flipper'
|
||||
// }
|
||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.flipper'
|
||||
}
|
||||
|
||||
if (enableHermes) {
|
||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||
releaseImplementation files(hermesPath + "hermes-release.aar")
|
||||
prImplementation files(hermesPath + "hermes-release.aar")
|
||||
} else {
|
||||
implementation jscFlavor
|
||||
}
|
||||
|
||||
// react-native-screens
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
|
||||
|
||||
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
|
||||
implementation project(':react-native-dialogs')
|
||||
implementation project(':react-native-blur')
|
||||
// Force using exact RN version instead of relying on gradle dependency resolution
|
||||
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
|
||||
implementation project(':react-native-status')
|
||||
implementation project(':react-native-status-keycard')
|
||||
implementation 'com.github.status-im:function:0.0.1'
|
||||
implementation 'com.facebook.fresco:fresco:2.2.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.2.0'
|
||||
implementation "com.squareup.okhttp3:okhttp-tls:3.12.12"
|
||||
compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
|
||||
}
|
||||
|
||||
def getLocalNDKDir = { ->
|
||||
def rootDir = project.rootDir
|
||||
def localProperties = new File(rootDir, "local.properties")
|
||||
if (!localProperties.exists()) {
|
||||
return null
|
||||
}
|
||||
Properties properties = new Properties()
|
||||
localProperties.withInputStream { instr ->
|
||||
properties.load(instr)
|
||||
}
|
||||
return properties.getProperty('ndk.dir')
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
// puts all compile dependencies into folder libs for BUCK to use
|
||||
task hemroidBuild(type: Exec) {
|
||||
def localNdkDir = getLocalNDKDir()
|
||||
def ndkDir = System.env.ANDROID_NDK_ROOT
|
||||
if (localNdkDir != null) {
|
||||
ndkDir = localNdkDir
|
||||
}
|
||||
|
||||
def execPath = "$ndkDir/ndk-build"
|
||||
def exec = new File(execPath)
|
||||
if (!exec.exists()) {
|
||||
throw new GradleException("No ndk-build binary found!")
|
||||
}
|
||||
executable execPath
|
||||
task copyDownloadableDepsToLibs(type: Copy) {
|
||||
from configurations.compile
|
||||
into 'libs'
|
||||
}
|
||||
|
||||
preBuild.dependsOn hemroidBuild
|
||||
|
||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := status-logs
|
||||
LOCAL_SRC_FILES := Log.c
|
||||
|
||||
LOCAL_CPPFLAGS := -std=c++11 -fexceptions -I$(LOCAL_PATH)/include
|
||||
LOCAL_LDFLAGS := -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -1,5 +0,0 @@
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
APP_LDFLAGS := -Wl,--build-id=none
|
||||
APP_PLATFORM := android-18
|
||||
APP_STL := c++_static
|
||||
NDK_TOOLCHAIN_VERSION=clang
|
||||
@@ -1,39 +0,0 @@
|
||||
// https://codelab.wordpress.com/2014/11/03/how-to-use-standard-output-streams-for-logging-in-android-apps/
|
||||
#include <jni.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <android/log.h>
|
||||
|
||||
static int pfd[2];
|
||||
static pthread_t thr;
|
||||
|
||||
static void *thread_func(void* param)
|
||||
{
|
||||
ssize_t rdsz;
|
||||
char buf[128];
|
||||
while((rdsz = read(pfd[0], buf, sizeof buf - 1)) > 0) {
|
||||
if(buf[rdsz - 1] == '\n') --rdsz;
|
||||
buf[rdsz] = 0; /* add null-terminator */
|
||||
__android_log_write(ANDROID_LOG_DEBUG, "StatusNativeLogs", buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
{
|
||||
/* make stdout line-buffered and stderr unbuffered */
|
||||
setvbuf(stdout, 0, _IOLBF, 0);
|
||||
setvbuf(stderr, 0, _IONBF, 0);
|
||||
|
||||
/* create the pipe and redirect stdout and stderr */
|
||||
pipe(pfd);
|
||||
dup2(pfd[1], 1);
|
||||
dup2(pfd[1], 2);
|
||||
|
||||
/* spawn the logging thread */
|
||||
if(pthread_create(&thr, 0, thread_func, 0) == -1)
|
||||
return JNI_VERSION_1_6; // fail silently
|
||||
pthread_detach(thr);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
@@ -9,15 +9,19 @@
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Disabling obfuscation is useful if you collect stack traces from production crashes
|
||||
# (unless you are using a system that supports de-obfuscate the stack traces).
|
||||
-dontobfuscate
|
||||
|
||||
# React Native
|
||||
|
||||
-keep class com.facebook.hermes.unicode.** { *; }
|
||||
-keep class com.facebook.jni.** { *; }
|
||||
|
||||
# Keep our interfaces so they can be used by other ProGuard rules.
|
||||
# See http://sourceforge.net/p/proguard/bugs/466/
|
||||
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
|
||||
@@ -46,10 +50,6 @@
|
||||
|
||||
-dontwarn com.facebook.react.**
|
||||
|
||||
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
|
||||
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
|
||||
-dontwarn android.text.StaticLayout
|
||||
|
||||
# okhttp
|
||||
|
||||
-keepattributes Signature
|
||||
@@ -64,15 +64,3 @@
|
||||
-dontwarn java.nio.file.*
|
||||
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
||||
-dontwarn okio.**
|
||||
|
||||
# fast-image
|
||||
|
||||
-keep public class com.dylanvann.fastimage.* {*;}
|
||||
-keep public class com.dylanvann.fastimage.** {*;}
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
-keep public class com.bumptech.glide.annotation.GlideModule
|
||||
-keep public class * extends com.bumptech.glide.module.AppGlideModule
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
def config = project.hasProperty("react") ? project.react : [];
|
||||
|
||||
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
|
||||
def entryFile = config.entryFile ?: "index.android.js"
|
||||
|
||||
// because elvis operator
|
||||
def elvisFile(thing) {
|
||||
return thing ? file(thing) : null;
|
||||
}
|
||||
|
||||
def reactRoot = elvisFile(config.root) ?: file("../../")
|
||||
def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"]
|
||||
|
||||
void runBefore(String dependentTaskName, Task task) {
|
||||
Task dependentTask = tasks.findByPath(dependentTaskName);
|
||||
if (dependentTask != null) {
|
||||
dependentTask.dependsOn task
|
||||
}
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
// Grab all build types and product flavors
|
||||
def buildTypes = android.buildTypes.collect { type -> type.name }
|
||||
def productFlavors = android.productFlavors.collect { flavor -> flavor.name }
|
||||
|
||||
// When no product flavors defined, use empty
|
||||
if (!productFlavors) productFlavors.add('')
|
||||
|
||||
productFlavors.each { productFlavorName ->
|
||||
buildTypes.each { buildTypeName ->
|
||||
// Create variant and source names
|
||||
def sourceName = "${buildTypeName}"
|
||||
def targetName = "${sourceName.capitalize()}"
|
||||
if (productFlavorName) {
|
||||
sourceName = "${productFlavorName}${targetName}"
|
||||
}
|
||||
|
||||
// React js bundle directories
|
||||
def jsBundleDirConfigName = "jsBundleDir${targetName}"
|
||||
def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
|
||||
file("$buildDir/intermediates/assets/${sourceName}")
|
||||
|
||||
def resourcesDirConfigName = "jsBundleDir${targetName}"
|
||||
def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
|
||||
file("$buildDir/intermediates/res/merged/${sourceName}")
|
||||
def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
|
||||
|
||||
// Bundle task name for variant
|
||||
def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets"
|
||||
|
||||
def currentBundleTask = tasks.create(
|
||||
name: bundleJsAndAssetsTaskName,
|
||||
type: Exec) {
|
||||
group = "react"
|
||||
description = "bundle JS and assets for ${targetName}."
|
||||
|
||||
// Create dirs if they are not there (e.g. the "clean" task just ran)
|
||||
doFirst {
|
||||
jsBundleDir.mkdirs()
|
||||
resourcesDir.mkdirs()
|
||||
}
|
||||
|
||||
// Set up inputs and outputs so gradle can cache the result
|
||||
inputs.files fileTree(dir: reactRoot, excludes: inputExcludes)
|
||||
outputs.dir jsBundleDir
|
||||
outputs.dir resourcesDir
|
||||
|
||||
// Set up the call to the react-native cli
|
||||
workingDir reactRoot
|
||||
|
||||
// Set up dev mode
|
||||
def devEnabled = !targetName.toLowerCase().contains("release")
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
|
||||
"--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
|
||||
} else {
|
||||
commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
|
||||
"--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
|
||||
}
|
||||
|
||||
enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release")
|
||||
}
|
||||
|
||||
// Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process
|
||||
currentBundleTask.dependsOn("merge${targetName}Resources")
|
||||
currentBundleTask.dependsOn("merge${targetName}Assets")
|
||||
|
||||
runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask)
|
||||
runBefore("processX86${targetName}Resources", currentBundleTask)
|
||||
runBefore("processUniversal${targetName}Resources", currentBundleTask)
|
||||
runBefore("process${targetName}Resources", currentBundleTask)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
|
||||
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
|
||||
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
|
||||
|
||||
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
|
||||
</manifest>
|
||||
@@ -1,73 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||
import com.facebook.flipper.android.utils.FlipperUtils;
|
||||
import com.facebook.flipper.core.FlipperClient;
|
||||
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
||||
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
||||
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||
// import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||
// import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.modules.network.NetworkingModule;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
public class ReactNativeFlipper {
|
||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||
|
||||
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||
client.addPlugin(new ReactFlipperPlugin());
|
||||
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||
|
||||
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
|
||||
// NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
||||
// NetworkingModule.setCustomClientBuilder(
|
||||
// new NetworkingModule.CustomClientBuilder() {
|
||||
// @Override
|
||||
// public void apply(OkHttpClient.Builder builder) {
|
||||
// builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
||||
// }
|
||||
// });
|
||||
// client.addPlugin(networkFlipperPlugin);
|
||||
client.start();
|
||||
|
||||
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
||||
// Hence we run if after all native modules have been initialized
|
||||
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||
if (reactContext == null) {
|
||||
reactInstanceManager.addReactInstanceEventListener(
|
||||
new ReactInstanceManager.ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(ReactContext reactContext) {
|
||||
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||
reactContext.runOnNativeModulesQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">Status Debug</string>
|
||||
</resources>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">localhost</domain>
|
||||
<domain includeSubdomains="true">10.0.3.2</domain>
|
||||
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
@@ -4,84 +4,56 @@
|
||||
package="im.status.ethereum">
|
||||
|
||||
<!-- non-dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_PROFILE" />
|
||||
|
||||
<!-- dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<!-- these permissions should be removed -->
|
||||
<!-- react-native-orientation adds an unnecessary permission; here we remove it -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/>
|
||||
<!-- react-native-contacts -->
|
||||
<uses-permission android:name="android.permission.WRITE_CONTACTS" tools:node="remove"/>
|
||||
<!-- react-native-camera -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.RECORD_VIDEO" tools:node="remove"/>
|
||||
<!-- React Native unnecessary permissions (https://github.com/facebook/react-native/issues/5886) -->
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
|
||||
|
||||
<application
|
||||
tools:replace="android:allowBackup"
|
||||
android:allowBackup="false"
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@style/AppTheme"
|
||||
android:name=".MainApplication"
|
||||
android:largeHeap="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
<meta-data android:name="commitHash" android:value="${commitHash}"/>
|
||||
android:largeHeap="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:resizeableActivity="false"
|
||||
android:launchMode="singleTask">
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:resizeableActivity="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="app-settings"
|
||||
android:host="notification" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http" android:host="join.status.im" />
|
||||
<data android:scheme="https" android:host="join.status.im" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="status-im" />
|
||||
<data android:scheme="ethereum" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<service
|
||||
android:name=".module.StatusService"
|
||||
android:enabled="true"
|
||||
android:exported="true"/>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||
<service android:name="im.status.ethereum.pushnotifications.ForegroundService"></service>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:replace="android:authorities">
|
||||
<meta-data
|
||||
tools:replace="android:resource"
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_provider_paths" />
|
||||
</provider>
|
||||
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,54 +1,34 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import android.annotation.TargetApi;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.provider.Settings;
|
||||
import android.os.Bundle;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
|
||||
import com.facebook.react.ReactFragmentActivity;
|
||||
import com.reactnativenavigation.NavigationActivity;
|
||||
import com.facebook.react.modules.core.PermissionListener;
|
||||
import org.devio.rn.splashscreen.SplashScreen;
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.cboy.rn.splashscreen.SplashScreen;
|
||||
import com.testfairy.TestFairy;
|
||||
|
||||
import java.util.Properties;
|
||||
import im.status.ethereum.module.StatusThreadPoolExecutor;
|
||||
import im.status.ethereum.MainApplication;
|
||||
|
||||
public class MainActivity extends NavigationActivity
|
||||
implements ActivityCompat.OnRequestPermissionsResultCallback{
|
||||
|
||||
|
||||
@Nullable private PermissionListener mPermissionListener;
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
private static void registerUncaughtExceptionHandler(final Context context) {
|
||||
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
@Override
|
||||
public void uncaughtException(final Thread thread, final Throwable t) {
|
||||
// High priority, so don't use StatusThreadPoolExecutor
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -88,54 +68,8 @@ public class MainActivity extends NavigationActivity
|
||||
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
|
||||
}
|
||||
|
||||
private Intent createNotificationSettingsIntent() {
|
||||
final Intent intent = new Intent();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
|
||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
|
||||
} else {
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
intent.addCategory(Intent.CATEGORY_DEFAULT);
|
||||
intent.setData(Uri.parse("package:" + getPackageName()));
|
||||
}
|
||||
return intent;
|
||||
}
|
||||
|
||||
private void tryToEmit(String eventName, WritableMap event) {
|
||||
try {
|
||||
((MainApplication) getApplication()).getReactNativeHost()
|
||||
.getReactInstanceManager()
|
||||
.getCurrentReactContext()
|
||||
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
||||
.emit("url", event);
|
||||
} catch(Exception e) {/* we expect NPE on first start, which is OK because we have a fallback */}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewIntent(final Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
if (intent.getDataString() != null && intent.getData().getScheme().startsWith("app-settings")) {
|
||||
startActivity(createNotificationSettingsIntent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
setTheme(R.style.DarkTheme);
|
||||
SplashScreen.show(this, R.style.DarkTheme, R.id.lottie);
|
||||
break;
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
setTheme(R.style.LightTheme);
|
||||
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
|
||||
break;
|
||||
default:
|
||||
setTheme(R.style.LightTheme);
|
||||
SplashScreen.show(this, R.style.LightTheme, R.id.lottie);
|
||||
}
|
||||
SplashScreen.setAnimationFinished(true);
|
||||
// Make sure we get an Alert for every uncaught exceptions
|
||||
registerUncaughtExceptionHandler(MainActivity.this);
|
||||
|
||||
@@ -143,12 +77,15 @@ public class MainActivity extends NavigationActivity
|
||||
final ActivityManager activityManager = getActivityManager();
|
||||
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
|
||||
|
||||
setSecureFlag();
|
||||
|
||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||
super.onCreate(null);
|
||||
SplashScreen.show(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if (!shouldShowRootedNotification()) {
|
||||
if(BuildConfig.TESTFAIRY_ENABLED == "1") {
|
||||
TestFairy.begin(this, "969f6c921cb435cea1d41d1ea3f5b247d6026d55");
|
||||
}
|
||||
|
||||
if (!RootUtil.isDeviceRooted()) {
|
||||
configureStatus();
|
||||
} else {
|
||||
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)
|
||||
@@ -156,7 +93,6 @@ public class MainActivity extends NavigationActivity
|
||||
.setPositiveButton(getResources().getString(R.string.root_okay), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
rejectRootedNotification();
|
||||
dialog.dismiss();
|
||||
configureStatus();
|
||||
}
|
||||
@@ -179,25 +115,6 @@ public class MainActivity extends NavigationActivity
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.loadLibrary("status-logs");
|
||||
|
||||
// when app is started but the Activity has been destroyed, the deep linking url event is
|
||||
// not emitted when coming back to foreground. This is a workaround. If the problem is
|
||||
// resolved in react-native this code should be removed
|
||||
if (getIntent().getData() != null) {
|
||||
WritableMap event = Arguments.createMap();
|
||||
event.putString("url", getIntent().getDataString());
|
||||
// on first start emit will (silently) fail, but the regular deep linking handler will work
|
||||
tryToEmit("url", event);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(r);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -205,7 +122,14 @@ public class MainActivity extends NavigationActivity
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript.
|
||||
* This is used to schedule rendering of the component.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "StatusIm";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
@@ -214,52 +138,4 @@ public class MainActivity extends NavigationActivity
|
||||
intent.putExtra("newConfig", newConfig);
|
||||
this.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
private static final String REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification";
|
||||
private static final Integer FREQUENCY_OF_REMINDER_IN_PERCENT = 5;
|
||||
|
||||
private boolean shouldShowRootedNotification() {
|
||||
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
|
||||
if (userRejectedRootedNotification()) {
|
||||
return ((Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT);
|
||||
} else return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean userRejectedRootedNotification() {
|
||||
SharedPreferences preferences = getPreferences(0);
|
||||
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false);
|
||||
}
|
||||
|
||||
private void rejectRootedNotification() {
|
||||
SharedPreferences preferences = getPreferences(0);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
private void setSecureFlag() {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
|
||||
mPermissionListener = listener;
|
||||
requestPermissions(permissions, requestCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
|
||||
mPermissionListener = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,36 +1,39 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
import android.util.Log;
|
||||
import android.content.Context;
|
||||
import android.webkit.WebView;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import com.facebook.react.PackageList;
|
||||
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
import com.BV.LinearGradient.LinearGradientPackage;
|
||||
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import com.bitgo.randombytes.RandomBytesPackage;
|
||||
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
|
||||
import com.centaurwarchief.smslistener.SmsListenerPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import cl.json.RNSharePackage;
|
||||
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.reactnativenavigation.NavigationApplication;
|
||||
import com.reactnativenavigation.react.NavigationReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
import com.cmcewen.blurview.BlurViewPackage;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage;
|
||||
import com.github.yamill.orientation.OrientationPackage;
|
||||
import com.i18n.reactnativei18n.ReactNativeI18n;
|
||||
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
|
||||
import com.lwansbrough.RCTCamera.RCTCameraPackage;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.reactnative.ivpusic.imagepicker.PickerPackage;
|
||||
import com.rnfs.RNFSPackage;
|
||||
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
|
||||
import es.tiarg.nfcreactnative.NfcReactNativePackage;
|
||||
import fr.bamlab.rnimageresizer.ImageResizerPackage;
|
||||
import im.status.ethereum.module.StatusPackage;
|
||||
import io.realm.react.RealmReactPackage;
|
||||
import me.alwx.HttpServer.HttpServerReactPackage;
|
||||
import com.mapbox.reactnativemapboxgl.ReactNativeMapboxGLPackage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import im.status.ethereum.keycard.RNStatusKeycardPackage;
|
||||
import im.status.ethereum.module.StatusPackage;
|
||||
import im.status.ethereum.pushnotifications.PushNotificationPackage;
|
||||
import im.status.ethereum.StatusOkHttpClientFactory;
|
||||
public class MainApplication extends MultiDexApplication implements ReactApplication {
|
||||
|
||||
import com.facebook.react.bridge.JSIModulePackage;
|
||||
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
||||
|
||||
public class MainApplication extends NavigationApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost = new NavigationReactNativeHost(this) {
|
||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
@@ -38,26 +41,36 @@ public class MainApplication extends NavigationApplication {
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
|
||||
List<ReactPackage> packages = new ArrayList<ReactPackage>(Arrays.asList(
|
||||
new MainReactPackage(),
|
||||
new HttpServerReactPackage(),
|
||||
new NfcReactNativePackage(),
|
||||
new SplashScreenReactPackage(),
|
||||
new StatusPackage(BuildConfig.DEBUG),
|
||||
new RealmReactPackage(),
|
||||
new VectorIconsPackage(),
|
||||
new ReactNativeContacts(),
|
||||
new ReactNativeI18n(),
|
||||
new RandomBytesPackage(),
|
||||
new LinearGradientPackage(),
|
||||
new RCTCameraPackage(),
|
||||
new SmsListenerPackage(),
|
||||
new OrientationPackage(),
|
||||
new RNFSPackage(),
|
||||
new ReactNativeDialogsPackage(),
|
||||
new ImageResizerPackage(),
|
||||
new PickerPackage(),
|
||||
new WebViewBridgePackage(BuildConfig.DEBUG),
|
||||
new ReactNativeMapboxGLPackage(),
|
||||
new ReactNativeConfigPackage()
|
||||
));
|
||||
|
||||
if (!BuildConfig.DEBUG) {
|
||||
packages.add(new RNInstabugReactnativePackage("b239f82a9cb00464e4c72cc703e6821e", MainApplication.this, "shake"));
|
||||
}
|
||||
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
packages.add(statusPackage);
|
||||
packages.add(new ReactNativeDialogsPackage());
|
||||
packages.add(new RNStatusKeycardPackage());
|
||||
packages.add(new PushNotificationPackage());
|
||||
packages.add(new BlurViewPackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JSIModulePackage getJSIModulePackage() {
|
||||
return new ReanimatedJSIModulePackage();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
@@ -65,43 +78,4 @@ public class MainApplication extends NavigationApplication {
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
OkHttpClientProvider.setOkHttpClientFactory(new StatusOkHttpClientFactory());
|
||||
|
||||
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
}
|
||||
/**
|
||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
*
|
||||
* @param context
|
||||
* @param reactInstanceManager
|
||||
*/
|
||||
private static void initializeFlipper(
|
||||
Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
try {
|
||||
/*
|
||||
We use reflection here to pick up the class that initializes Flipper,
|
||||
since Flipper library is not available in release mode
|
||||
*/
|
||||
Class<?> aClass = Class.forName("im.status.ethereum.ReactNativeFlipper");
|
||||
aClass
|
||||
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||
.invoke(null, context, reactInstanceManager);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import com.facebook.react.modules.network.OkHttpClientFactory;
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.tls.HandshakeCertificates;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.lang.RuntimeException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
||||
import im.status.ethereum.module.StatusPackage;
|
||||
|
||||
class StatusOkHttpClientFactory implements OkHttpClientFactory {
|
||||
public OkHttpClient createNewNetworkModuleClient() {
|
||||
String certPem = StatusPackage.getImageTLSCert();
|
||||
X509Certificate cert;
|
||||
|
||||
try {
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(certPem.getBytes()));
|
||||
} catch(Exception e) {
|
||||
Log.e("StatusOkHttpClientFactory", "Could not parse certificate");
|
||||
cert = null;
|
||||
}
|
||||
|
||||
HandshakeCertificates clientCertificates = new HandshakeCertificates.Builder()
|
||||
.addPlatformTrustedCertificates()
|
||||
.addTrustedCertificate(cert)
|
||||
.build();
|
||||
|
||||
return OkHttpClientProvider.createClientBuilder()
|
||||
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 526 B |
|
After Width: | Height: | Size: 614 B |
|
After Width: | Height: | Size: 613 B |
|
After Width: | Height: | Size: 537 B |
|
After Width: | Height: | Size: 576 B |
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 398 B |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 153 B |
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 336 B |
|
After Width: | Height: | Size: 486 B |