Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efa8bec582 | ||
|
|
b6705db744 |
@@ -1,55 +1,62 @@
|
||||
legacy.status-im.utils.build/warning-handler
|
||||
legacy.status-im.utils.build/get-current-sha
|
||||
status-im.constants/spacing-char
|
||||
status-im.constants/arg-wrapping-char
|
||||
legacy.status-im.ios.core/init
|
||||
legacy.status-im.ui.components.camera/aspects
|
||||
legacy.status-im.ui.components.camera/capture-targets
|
||||
legacy.status-im.ui.components.camera/set-torch
|
||||
legacy.status-im.ui.components.camera/request-access-ios
|
||||
legacy.status-im.chat.models.message-content/stylings
|
||||
legacy.status-im.chat.models.message-content/actions
|
||||
legacy.status-im.chat.models.message-content/blank-string
|
||||
legacy.status-im.chat.models.message-content/sorted-ranges
|
||||
legacy.status-im.ethereum.mnemonic/words->passphrase
|
||||
native-module.core/listener
|
||||
native-module.core/multiaccount-reset
|
||||
native-module.core/extract-group-membership-signatures
|
||||
native-module.core/sign-group-membership
|
||||
native-module.core/update-mailservers
|
||||
legacy.status-im.ethereum.abi-spec/bytes-to-hex
|
||||
legacy.status-im.android.core/init
|
||||
legacy.status-im.chat.models.message/transport-keys
|
||||
legacy.status-im.utils.datetime/week
|
||||
legacy.status-im.utils.datetime/time-ago
|
||||
legacy.status-im.utils.datetime/format-date
|
||||
legacy.status-im.utils.datetime/get-ordinal-date
|
||||
status-im.utils.build/warning-handler
|
||||
status-im.utils.build/get-current-sha
|
||||
status-im2.constants/spacing-char
|
||||
status-im2.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
|
||||
legacy.status-im.multiaccounts.create.core/get-new-key-code
|
||||
legacy.status-im.ethereum.decode/string
|
||||
legacy.status-im.ui.screens.network.views/mainnet?
|
||||
legacy.status-im.data-store.chats/event->string
|
||||
legacy.status-im.mailserver.constants/seven-days
|
||||
legacy.status-im.mailserver.constants/connection-timeout
|
||||
legacy.status-im.hardwallet.card/install-applet
|
||||
legacy.status-im.hardwallet.card/install-cash-applet
|
||||
legacy.status-im.multiaccount.login.data-test/all-contacts
|
||||
legacy.status-im.multiaccount.login.data-test/multiaccounts
|
||||
legacy.status-im.multiaccount.login.data-test/get-chats
|
||||
legacy.status-im.multiaccount.login.data-test/transport
|
||||
legacy.status-im.multiaccount.login.data-test/topics
|
||||
legacy.status-im.utils.utils/clear-timeout
|
||||
legacy.status-im.utils.handlers/logged-in
|
||||
legacy.status-im.multiaccounts.model/credentials
|
||||
legacy.status-im.multiaccounts.login.core/contract-fleet?
|
||||
legacy.status-im.multiaccounts.login.core/fetch-nodes
|
||||
status-im.config/rpc-networks-only?
|
||||
status-im.config/waku-enabled?
|
||||
legacy.status-im.utils.pairing/has-paired-installations?
|
||||
legacy.status-im.tribute-to-talk.core-test/user-cofx
|
||||
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-im2.config/rpc-networks-only?
|
||||
status-im2.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
|
||||
@@ -78,108 +85,152 @@ mocks.js-dependencies/react-navigation-bottom-tabs
|
||||
mocks.js-dependencies/react-native-haptic-feedback
|
||||
mocks.js-dependencies/mock
|
||||
quo.previews.main/init
|
||||
legacy.status-im.chat.models.message-list-test/descending-range
|
||||
legacy.status-im.chat.models.message-list-test/random-range
|
||||
legacy.status-im.ethereum.eip165/supports?
|
||||
legacy.status-im.utils.hex/valid-hex?
|
||||
legacy.status-im.multiaccounts.core/chat-send?
|
||||
legacy.status-im.hardwallet.simulated-keycard/install-cash-applet
|
||||
legacy.status-im.hardwallet.simulated-keycard/sign-typed-data
|
||||
legacy.status-im.utils.core/safe-read-message-content
|
||||
legacy.status-im.ui.components.react/native-modules
|
||||
legacy.status-im.ui.components.react/progress-bar
|
||||
react-native.fs/move-file
|
||||
react-native.fs/read-dir
|
||||
react-native.fs/mkdir
|
||||
react-native.fs/unlink
|
||||
react-native.fs/file-exists?
|
||||
legacy.status-im.ui.components.colors/white
|
||||
legacy.status-im.ui.components.colors/black
|
||||
legacy.status-im.ui.components.core/animated-header
|
||||
legacy.status-im.ui.components.core/safe-area-provider
|
||||
legacy.status-im.ui.components.core/safe-area-consumer
|
||||
legacy.status-im.ui.components.core/safe-area-view
|
||||
legacy.status-im.utils.universal-links.core/open!
|
||||
legacy.status-im.transport.filters.core-test/member-2
|
||||
legacy.status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
|
||||
legacy.status-im.ethereum.ens/ttl
|
||||
legacy.status-im.ethereum.ens/addr-hash
|
||||
legacy.status-im.ethereum.ens/name-hash
|
||||
legacy.status-im.ethereum.ens/ABI-hash
|
||||
legacy.status-im.ethereum.ens/pubkey-hash
|
||||
legacy.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
|
||||
legacy.status-im.multiaccounts.update.publisher/publish-update!
|
||||
legacy.status-im.utils.async/task-queue
|
||||
legacy.status-im.utils.async/async-periodic-run!
|
||||
legacy.status-im.desktop.core/app-root
|
||||
legacy.status-im.desktop.core/init
|
||||
legacy.status-im.chat.models-test/test-db
|
||||
legacy.status-im.ui.components.spacing/padding-vertical
|
||||
legacy.status-im.utils.money/percent-change
|
||||
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-im2.constants/desktop-content-types
|
||||
status-im2.constants/blocks-per-hour
|
||||
status-im2.constants/one-earth-day
|
||||
status-im2.constants/left-pane-min-width
|
||||
status-im2.constants/system
|
||||
status-im2.constants/contact-discovery
|
||||
status-im2.constants/send-transaction-failed-parse-response
|
||||
status-im2.constants/send-transaction-failed-parse-params
|
||||
status-im2.constants/send-transaction-no-account-selected
|
||||
status-im2.constants/send-transaction-invalid-tx-sender
|
||||
status-im2.constants/web3-get-logs
|
||||
status-im2.constants/web3-transaction-receipt
|
||||
status-im2.constants/web3-new-filter
|
||||
status-im2.constants/web3-new-pending-transaction-filter
|
||||
status-im2.constants/web3-new-block-filter
|
||||
status-im2.constants/web3-uninstall-filter
|
||||
status-im2.constants/web3-get-filter-changes
|
||||
status-im2.constants/web3-shh-post
|
||||
status-im2.constants/web3-shh-new-identity
|
||||
status-im2.constants/web3-shh-has-identity
|
||||
status-im2.constants/web3-shh-new-group
|
||||
status-im2.constants/web3-shh-add-to-group
|
||||
status-im2.constants/web3-shh-new-filter
|
||||
status-im2.constants/web3-shh-uninstall-filter
|
||||
status-im2.constants/web3-shh-get-filter-changes
|
||||
status-im2.constants/web3-shh-get-messages
|
||||
status-im2.constants/status-create-address
|
||||
status-im2.constants/event-transfer-hash
|
||||
status-im2.constants/regx-rtl-characters
|
||||
status-im2.constants/desktop-msg-chars-hard-limit
|
||||
status-im2.constants/debug-metrics
|
||||
status-im2.constants/scan-qr-code
|
||||
status-im2.constants/ipfs-proto-code
|
||||
status-im2.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>=
|
||||
utils.debounce/clear-all
|
||||
legacy.status-im.transport.db/create-chat
|
||||
legacy.status-im.utils.priority-map/priority-map
|
||||
legacy.status-im.utils.priority-map/priority-map-by
|
||||
legacy.status-im.utils.priority-map/priority-map-keyfn
|
||||
legacy.status-im.utils.priority-map/empty-message-map
|
||||
legacy.status-im.wallet.choose-recipient.core/use-default-eth-gas
|
||||
legacy.status-im.ui.components.animation/decay
|
||||
legacy.status-im.ui.components.animation/remove-all-listeners
|
||||
legacy.status-im.ui.components.animation/stop-animation
|
||||
legacy.status-im.ui.components.animation/animated
|
||||
legacy.status-im.ui.components.animation/add
|
||||
legacy.status-im.ui.components.animation/subtract
|
||||
legacy.status-im.ui.components.animation/get-layout
|
||||
legacy.status-im.wallet.transactions-test/uri-query-data
|
||||
legacy.status-im.utils.name/shortened-name
|
||||
legacy.status-im.ui.components.button.haptic/trigger
|
||||
legacy.status-im.contact.db/filter-dapps
|
||||
legacy.status-im.contact.db/filter-group-contacts
|
||||
legacy.status-im.contact.db/legacy-pending?
|
||||
legacy.status-im.utils.transducers-test/preview-call-1
|
||||
legacy.status-im.utils.transducers-test/preview-call-2
|
||||
legacy.status-im.utils.types/to-string
|
||||
legacy.status-im.chat.db/datemark?
|
||||
legacy.status-im.chat.db/gap?
|
||||
legacy.status-im.chat.db/map->sorted-seq
|
||||
legacy.status-im.utils.snoopy/status-module-filter
|
||||
legacy.status-im.utils.snoopy/websocket-filter
|
||||
legacy.status-im.utils.snoopy/touches-filter
|
||||
legacy.status-im.utils.snoopy/native-animation-filter
|
||||
legacy.status-im.utils.snoopy/keyboard-observer-filter
|
||||
legacy.status-im.utils.multihash/hex
|
||||
legacy.status-im.utils.multihash/decode-array
|
||||
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 +0,0 @@
|
||||
{:lint-as {babashka.fs/with-temp-dir clojure.core/let}}
|
||||
@@ -1 +0,0 @@
|
||||
{:hooks {:macroexpand {sci.core/copy-ns sci.core/copy-ns}}}
|
||||
@@ -1,9 +0,0 @@
|
||||
(ns sci.core)
|
||||
|
||||
(defmacro copy-ns
|
||||
([ns-sym sci-ns]
|
||||
`(copy-ns ~ns-sym ~sci-ns nil))
|
||||
([ns-sym sci-ns opts]
|
||||
`[(quote ~ns-sym)
|
||||
~sci-ns
|
||||
(quote ~opts)]))
|
||||
@@ -1,88 +1,23 @@
|
||||
{:config-paths ["status-im"]
|
||||
:output {:exclude-files ["src/user.cljs" "src/dev/user.cljs"]}
|
||||
:lint-as {legacy.status-im.utils.views/defview clojure.core/defn
|
||||
legacy.status-im.utils.views/letsubs clojure.core/let
|
||||
reagent.core/with-let clojure.core/let
|
||||
legacy.status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
|
||||
utils.re-frame/defn clj-kondo.lint-as/def-catch-all
|
||||
quo.react/with-deps-check clojure.core/fn
|
||||
quo.previews.preview/list-comp clojure.core/for
|
||||
legacy.status-im.utils.styles/def clojure.core/def
|
||||
legacy.status-im.utils.styles/defn clojure.core/defn
|
||||
test-helpers.unit/deftest-sub clojure.core/defn
|
||||
test-helpers.unit/deftest-event clojure.core/defn
|
||||
|
||||
taoensso.tufte/defnp clojure.core/defn}
|
||||
:linters {:case-duplicate-test {:level :error}
|
||||
:case-quoted-test {:level :error}
|
||||
:case-symbol-test {:level :error}
|
||||
:clj-kondo-config {:level :error}
|
||||
:cond-else {:level :error}
|
||||
:condition-always-true {:level :error}
|
||||
:conflicting-alias {:level :error}
|
||||
:consistent-alias {:level :error
|
||||
:aliases {clojure.set set
|
||||
clojure.string string
|
||||
clojure.walk walk
|
||||
malli.core malli
|
||||
malli.dev.pretty malli.pretty
|
||||
malli.dev.virhe malli.virhe
|
||||
malli.error malli.error
|
||||
malli.generator malli.generator
|
||||
malli.transform malli.transform
|
||||
malli.util malli.util
|
||||
promesa.core promesa
|
||||
schema.core schema
|
||||
status-im.feature-flags ff
|
||||
taoensso.timbre log}}
|
||||
:deprecated-namespace {:level :warning}
|
||||
:docstring-blank {:level :error}
|
||||
:equals-true {:level :error}
|
||||
:inline-def {:level :error}
|
||||
:invalid-arity {:skip-args [legacy.status-im.utils.fx/defn
|
||||
utils.re-frame/defn]}
|
||||
:loop-without-recur {:level :error}
|
||||
:minus-one {:level :error}
|
||||
:misplaced-docstring {:level :error}
|
||||
:missing-body-in-when {:level :error}
|
||||
:missing-clause-in-try {:level :error}
|
||||
:missing-else-branch {:level :error}
|
||||
:multiple-async-in-deftest {:level :error}
|
||||
:not-empty? {:level :error}
|
||||
:plus-one {:level :error}
|
||||
:redundant-do {:level :error}
|
||||
:redundant-let {:level :error}
|
||||
:refer-all {:level :error}
|
||||
:shadowed-fn-param {:level :error}
|
||||
:shadowed-var {:level :error
|
||||
;; We temporarily use :include to define an
|
||||
;; allowlist of core Clojure vars. In the
|
||||
;; future, as we progressively fix shadowed
|
||||
;; vars, we should be able to delete this
|
||||
;; option and lint all vars.
|
||||
:exclude [type name]}
|
||||
:self-requiring-namespace {:level :error}
|
||||
:single-operand-comparison {:level :error}
|
||||
:syntax {:level :error}
|
||||
:unbound-destructuring-default {:level :error}
|
||||
:underscore-in-namespace {:level :error}
|
||||
:uninitialized-var {:level :error}
|
||||
:unknown-require-option {:level :error}
|
||||
:unreachable-code {:level :error}
|
||||
:unresolved-namespace {:level :error}
|
||||
{: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
|
||||
utils.re-frame/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
|
||||
test-helpers.unit/deftest-sub clojure.core/defn
|
||||
taoensso.tufte/defnp clojure.core/defn}
|
||||
:linters {:consistent-alias {:level :error
|
||||
:aliases {clojure.string string
|
||||
clojure.set set
|
||||
clojure.walk walk
|
||||
taoensso.timbre log}}
|
||||
:invalid-arity {:skip-args [status-im.utils.fx/defn utils.re-frame/defn]}
|
||||
;; TODO remove number when this is fixed
|
||||
;; https://github.com/borkdude/clj-kondo/issues/867
|
||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
||||
number
|
||||
legacy.status-im.test-helpers/restore-app-db
|
||||
(cljs.test/is [match-strict?])]}
|
||||
:unresolved-var {:level :error}
|
||||
:unsorted-required-namespaces {:level :error}
|
||||
:unused-alias {:level :warning}
|
||||
:unused-binding {:level :error}
|
||||
:unused-import {:level :error}
|
||||
:unused-namespace {:level :error}
|
||||
:unused-private-var {:level :error}
|
||||
:unused-referred-var {:level :error}
|
||||
:use {:level :error}}
|
||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
||||
number
|
||||
status-im.test-helpers/restore-app-db]}}
|
||||
:config-in-ns {mocks.js-dependencies {:linters {:clojure-lsp/unused-public-var {:level :off}}}}}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{:lint-as {promesa.core/-> clojure.core/->
|
||||
promesa.core/->> clojure.core/->>
|
||||
promesa.core/as-> clojure.core/as->
|
||||
promesa.core/let clojure.core/let
|
||||
promesa.core/plet clojure.core/let
|
||||
promesa.core/loop clojure.core/loop
|
||||
promesa.core/recur clojure.core/recur
|
||||
promesa.core/with-redefs clojure.core/with-redefs
|
||||
promesa.core/doseq clojure.core/doseq}}
|
||||
@@ -1,2 +0,0 @@
|
||||
{:lint-as {malli.experimental/defn schema.core/defn}
|
||||
:linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}}
|
||||
@@ -1,4 +0,0 @@
|
||||
{:linters
|
||||
{:unresolved-symbol
|
||||
{:exclude [(cljs.test/is [match? thrown-match?])
|
||||
(clojure.test/is [match? thrown-match?])]}}}
|
||||
@@ -1,5 +0,0 @@
|
||||
{:lint-as
|
||||
{rewrite-clj.zip/subedit-> clojure.core/->
|
||||
rewrite-clj.zip/subedit->> clojure.core/->>
|
||||
rewrite-clj.zip/edit-> clojure.core/->
|
||||
rewrite-clj.zip/edit->> clojure.core/->>}}
|
||||
@@ -1,21 +0,0 @@
|
||||
(ns cljs.test
|
||||
(:require [clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn deftest
|
||||
"Verify test name passed to `cljs.test/deftest` is suffixed with -test and not
|
||||
prefixed with test-."
|
||||
[{:keys [node]}]
|
||||
(let [[_ test-name-node & _] (:children node)
|
||||
test-name (str (hooks/sexpr test-name-node))]
|
||||
(when (and (hooks/token-node? test-name-node)
|
||||
(or (not (re-find #"^.*-test$" test-name))
|
||||
(re-find #"^test-.*$" test-name)))
|
||||
(hooks/reg-finding! (assoc (meta test-name-node)
|
||||
:message "Test name should be suffixed with -test"
|
||||
:type :status-im.linter/inconsistent-test-name)))))
|
||||
|
||||
(comment
|
||||
;; Invalid
|
||||
(deftest {:node (hooks/parse-string "(deftest foo-tes (println :hello))")})
|
||||
(deftest {:node (hooks/parse-string "(deftest test-foo-test (println :hello))")})
|
||||
)
|
||||
@@ -1,11 +0,0 @@
|
||||
{:hooks
|
||||
{:analyze-call
|
||||
{utils.i18n/label utils.i18n/label
|
||||
test-helpers.component/get-all-by-translation-text utils.i18n/label
|
||||
test-helpers.component/get-by-translation-text utils.i18n/label
|
||||
test-helpers.component/query-all-by-translation-text utils.i18n/label
|
||||
test-helpers.component/query-by-translation-text utils.i18n/label
|
||||
|
||||
cljs.test/deftest cljs.test/deftest}}
|
||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}
|
||||
:status-im.linter/inconsistent-test-name {:level :error}}}
|
||||
@@ -1,26 +0,0 @@
|
||||
(ns utils.i18n
|
||||
(:require [clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn label
|
||||
"Verify call to `utils.i18n/label` pass the translation keyword qualified with `t`."
|
||||
[{:keys [node]}]
|
||||
(let [[_ translation-key-node & _] (:children node)]
|
||||
(when (and (hooks/keyword-node? translation-key-node)
|
||||
(not= "t" (-> translation-key-node hooks/sexpr namespace)))
|
||||
(hooks/reg-finding! (assoc (meta translation-key-node)
|
||||
:message "Translation keyword should be qualified with \"t\""
|
||||
:type :status-im.linter/invalid-translation-keyword)))))
|
||||
|
||||
(comment
|
||||
;; Valid
|
||||
(label {:node (hooks/parse-string "(i18n/label :t/foo {:var \"hello\"})")
|
||||
:cljc false
|
||||
:lang :cljs
|
||||
:filename ""
|
||||
:config {}
|
||||
:ns ""
|
||||
:context nil})
|
||||
|
||||
;; Invalid
|
||||
(label {:node (hooks/parse-string "(i18n/label :foo)")})
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
|
||||
@@ -1,16 +0,0 @@
|
||||
(ns taoensso.encore
|
||||
(:require
|
||||
[clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn defalias [{:keys [node]}]
|
||||
(let [[sym-raw src-raw] (rest (:children node))
|
||||
src (if src-raw src-raw sym-raw)
|
||||
sym (if src-raw
|
||||
sym-raw
|
||||
(symbol (name (hooks/sexpr src))))]
|
||||
{:node (with-meta
|
||||
(hooks/list-node
|
||||
[(hooks/token-node 'def)
|
||||
(hooks/token-node (hooks/sexpr sym))
|
||||
(hooks/token-node (hooks/sexpr src))])
|
||||
(meta src))}))
|
||||
@@ -0,0 +1,37 @@
|
||||
module.exports = {
|
||||
"testRunner": "jest",
|
||||
"testRegex": "\\.visual\\.js$",
|
||||
"runner-config": "visual-test/config.json",
|
||||
"devices": {
|
||||
"simulator": {
|
||||
"type": "ios.simulator",
|
||||
"device": {
|
||||
"type": "iPhone 11 Pro"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apps": {
|
||||
"ios.release": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/StatusIm.app",
|
||||
"build": "make release-ios"
|
||||
},
|
||||
"ios.debug": {
|
||||
"name": "StatusIm",
|
||||
"type": "ios.app",
|
||||
"binaryPath": process.env.TEST_BINARY_PATH,
|
||||
"build": "make run-ios SIMULATOR='iPhone 11 Pro'"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"ios.sim.release": {
|
||||
"device": "simulator",
|
||||
"app": "ios.release"
|
||||
},
|
||||
"ios.sim.debug": {
|
||||
"device": "simulator",
|
||||
"app": "ios.debug"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ DEFAULT_NETWORK=mainnet_rpc
|
||||
DEV_BUILD=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=status.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
@@ -21,18 +22,14 @@ 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
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
TEST_STATEOFUS=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=0
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -2,7 +2,7 @@ DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=goerli_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=status.staging
|
||||
FLEET=status.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
@@ -21,6 +21,7 @@ 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
|
||||
@@ -32,11 +33,3 @@ DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
SHOW_NOT_IMPLEMENTED_FEATURES=1
|
||||
DELETE_MESSAGE_FOR_ME_UNDO_TIME_LIMIT=10000
|
||||
DELETE_MESSAGE_UNDO_TIME_LIMIT=10000
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
|
||||
|
||||
@@ -3,6 +3,7 @@ DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=goerli_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=status.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
@@ -25,6 +26,7 @@ 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
|
||||
@@ -33,7 +35,3 @@ TWO_MINUTES_SYNCING=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
LOCAL_PAIRING_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||
TEST_NETWORKS_ENABLED=1
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -2,6 +2,7 @@ DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=status.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
@@ -16,11 +17,8 @@ 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
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
|
||||
@@ -2,6 +2,7 @@ DEBUG_WEBVIEW=0
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ETHEREUM_DEV_CLUSTER=0
|
||||
EXTENSIONS=0
|
||||
FLEET=status.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
@@ -17,6 +18,4 @@ PARTITIONED_TOPIC=0
|
||||
ENABLE_ROOT_ALERT=1
|
||||
MAX_IMAGES_BATCH=1
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||
TEST_NETWORKS_ENABLED=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
COLLECTIBLES_ENABLED=1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native',
|
||||
};
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
|
||||
@@ -43,4 +43,4 @@ As a <user|developer|...>, I want to <task> so that <goal>.
|
||||
[comment]: # (if on Android please replicate bug whilst running adb logcat)
|
||||
```
|
||||
...
|
||||
```
|
||||
```
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: MVPBug Report
|
||||
about: MVPBug Report
|
||||
name: Bug Report
|
||||
about: Bug Report
|
||||
title: ''
|
||||
labels: ['E:Mobile Bug MVP', ':1234: low prio']
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
@@ -22,7 +22,8 @@ assignees: ''
|
||||
|
||||
### Reproduction
|
||||
|
||||
1.
|
||||
1) Open Status
|
||||
2)
|
||||
|
||||
### Additional Information
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Wont fix Report
|
||||
about: to facilitate future handling, identify and address non-urgent issues that won't be prioritized in the near future
|
||||
title: ''
|
||||
labels: likely_wont_fix
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Problem
|
||||
|
||||
|
||||
#### Expected behavior
|
||||
|
||||
|
||||
#### Actual behavior
|
||||
|
||||
|
||||
### Reproduction
|
||||
|
||||
1.
|
||||
|
||||
### Additional Information
|
||||
|
||||
- Status version: release
|
||||
- Operating System: Android, iOS
|
||||
|
||||
|
||||
[comment]: # (Please, add logs/notes if necessary)
|
||||
|
||||
@@ -63,26 +63,4 @@ Documentation change PR (review please): https://github.com/status-im/status.im/
|
||||
|
||||
<!-- (PRs will only be accepted if squashed into single commit.) -->
|
||||
|
||||
### Before and after screenshots comparison
|
||||
|
||||
| Figma (if available) | iOS (if available) | Android (if available)
|
||||
| --- | --- | --- |
|
||||
| Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. |
|
||||
|
||||
status: ready <!-- Can be ready or wip -->
|
||||
|
||||
<!-- Uncomment this section for status-go upgrade/dogfooding pull requests
|
||||
|
||||
- Specify potentially impacted user flows in _Areas that maybe impacted*.
|
||||
- Ensure that _Steps to test_ is filled in.
|
||||
|
||||
### Risk
|
||||
|
||||
Described potential risks and worst case scenarios.
|
||||
|
||||
Tick **one**:
|
||||
- [ ] Low risk: 2 devs MUST perform testing as specified above and attach their results as comments to this PR **before** merging.
|
||||
- [ ] High risk: QA team MUST perform additional testing in the specified affected areas **before** merging.
|
||||
|
||||
|
||||
-->
|
||||
|
||||
@@ -5,6 +5,7 @@ project-board:
|
||||
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'
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
# Xcode
|
||||
#
|
||||
/ios/.xcode.env.local
|
||||
/component-spec
|
||||
result/
|
||||
build/
|
||||
@@ -36,10 +35,6 @@ project.xcworkspace
|
||||
**/android/.project
|
||||
**/android/.settings/org.eclipse.buildship.core.prefs
|
||||
local.properties
|
||||
*.hprof
|
||||
.cxx/
|
||||
*.keystore
|
||||
!debug.keystore
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
@@ -83,9 +78,6 @@ shim.js
|
||||
figwheel_server.log
|
||||
.nrepl-port
|
||||
|
||||
# FlowStorm (Clojure debugger)
|
||||
repl-client-debug
|
||||
|
||||
# Lein
|
||||
#
|
||||
.lein-failures
|
||||
@@ -108,8 +100,9 @@ Statusgo.xcframework
|
||||
|
||||
#ios
|
||||
/ios/Pods/
|
||||
/ios/logs/
|
||||
/ios/StatusIm.xcworkspace
|
||||
/ios/react-native-xcode.log
|
||||
/ios/set_xcode_version.log
|
||||
.ruby-version
|
||||
status-e2e/
|
||||
|
||||
@@ -130,8 +123,6 @@ fastlane/README.md
|
||||
# Clj
|
||||
|
||||
.cpcache/
|
||||
src/user.cljs
|
||||
src/dev/user.cljs
|
||||
|
||||
# emacs
|
||||
.dir-locals.el
|
||||
@@ -192,13 +183,4 @@ test/appium/tests/users.py
|
||||
/.calva/
|
||||
|
||||
## component-tests
|
||||
*.log
|
||||
|
||||
## local xcode env introduced in react-native 0.69
|
||||
.xcode.env.local
|
||||
|
||||
## git hooks
|
||||
lefthook.yml
|
||||
|
||||
## build time logs
|
||||
/logs/*.log
|
||||
*.log
|
||||
@@ -1 +0,0 @@
|
||||
{:clean {:ns-inner-blocks-indentation :keep}}
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"include": [
|
||||
"target/test/legacy/status_im/**"
|
||||
"target/test/status_im/**"
|
||||
],
|
||||
"exclude": [
|
||||
"target/test/legacy/status_im/test/**",
|
||||
"target/test/legacy/status_im/ui/**"
|
||||
"target/test/status_im/test/**",
|
||||
"target/test/status_im/ui/**"
|
||||
],
|
||||
"report-dir": "./coverage-report",
|
||||
"all": true,
|
||||
@@ -14,4 +14,4 @@
|
||||
"exclude-after-remap": false,
|
||||
"extension": [".js"],
|
||||
"reporter": ["lcovonly"]
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
/*
|
||||
|
||||
# Format top-level js files.
|
||||
!*.js
|
||||
|
||||
# Ignore all except src/js/**/*.js
|
||||
!/src/
|
||||
/src/*
|
||||
!/src/js
|
||||
!/src/js/**/*.js
|
||||
|
||||
# Ignore all except translations/en.json
|
||||
!/translations/
|
||||
/translations/*
|
||||
!/translations/en.json
|
||||
@@ -1,13 +1,7 @@
|
||||
module.exports = {
|
||||
arrowParens: 'always',
|
||||
printWidth: 120,
|
||||
semi: true,
|
||||
singleQuote: true,
|
||||
tabWidth: 2,
|
||||
trailingComma: 'all',
|
||||
useTabs: false,
|
||||
|
||||
// JSON sorting
|
||||
jsonSortOrder: '{ "/.*/": "caseInsensitiveLexical" } ',
|
||||
plugins: ['prettier-plugin-sort-json'],
|
||||
bracketSpacing: false,
|
||||
bracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
tabWidth: 4,
|
||||
};
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"clojure.format.enable": false,
|
||||
"[clojure]": {
|
||||
"editor.defaultFormatter": "rflagreca.vscode-clj-zprint"
|
||||
},
|
||||
"vscode-clj-zprint.IgnoreExternalFiles": false,
|
||||
"vscode-clj-zprint.CommunityFormatting": false,
|
||||
"vscode-clj-zprint.OptionsMap": "",
|
||||
"vscode-clj-zprint.width": "",
|
||||
"vscode-clj-zprint.Styles.UseOnlyTheseStyles": false
|
||||
}
|
||||
@@ -1,62 +1,46 @@
|
||||
;; -*- mode: clojure -*-
|
||||
;; vi: ft=clojure
|
||||
{:width 105
|
||||
:remove {:fn-force-nl #{:noarg1-body}}
|
||||
{:width 105
|
||||
:style [;; community style
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
|
||||
:community
|
||||
|
||||
:style
|
||||
[;; community style https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
|
||||
:community
|
||||
;; no comma in map
|
||||
:no-comma
|
||||
|
||||
;; no comma in map
|
||||
:no-comma
|
||||
:custom-justify
|
||||
|
||||
:custom-justify
|
||||
|
||||
;; respect all newlines https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
|
||||
:respect-nl
|
||||
|
||||
;; respect blank line https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
|
||||
:respect-bl
|
||||
|
||||
;; hang multiline left-hand-thing https://github.com/kkinnear/zprint/issues/273
|
||||
:multi-lhs-hang]
|
||||
;; respect all newlines
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
|
||||
:respect-nl
|
||||
|
||||
;; respect blank line
|
||||
;; https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
|
||||
:respect-bl]
|
||||
:fn-map
|
||||
{"reg-sub" :arg1-pair
|
||||
"h/describe" :arg1-body
|
||||
"h/describe-skip" :arg1-body
|
||||
"h/describe-only" :arg1-body
|
||||
"h/test" :arg1-body
|
||||
"h/test-skip" :arg1-body
|
||||
"h/test-only" :arg1-body
|
||||
"test/async" :arg1-body
|
||||
"test/use-fixtures" :arg1-body
|
||||
"global.describe" :arg1-body
|
||||
"global.test" :arg1-body
|
||||
"list-comp" :binding
|
||||
"defview" :arg1-body
|
||||
"letsubs" :binding
|
||||
"with-let" "let"
|
||||
"reg-event-fx" :arg1-pair
|
||||
"reg-fx" :arg1-pair
|
||||
"testing" :arg1-body
|
||||
"deftest-sub" :arg1-body
|
||||
"deftest-event" :arg1-body
|
||||
"test-async" :arg1-body
|
||||
"wait-for" :arg1-body
|
||||
"with-deps-check" :arg1-body
|
||||
"schema/=>" :arg1-body
|
||||
"->" [:noarg1-body
|
||||
{:list {:constant-pair? false :force-nl? false}
|
||||
:next-inner-restore [[:list :constant-pair?]]}]
|
||||
"set!" "reset!"
|
||||
"assoc-when" "assoc"
|
||||
"assoc-some" "assoc"
|
||||
"conj-when" "conj"
|
||||
"conj-some" "conj"}
|
||||
|
||||
{"reg-sub" :arg1-pair
|
||||
"h/describe" :arg1-body
|
||||
"h/test" :arg1-body
|
||||
"global.describe" :arg1-body
|
||||
"global.test" :arg1-body
|
||||
"list-comp" :binding
|
||||
"defview" :arg1-body
|
||||
"letsubs" :binding
|
||||
"testing" :arg1-body
|
||||
"deftest-sub" :arg1-body
|
||||
"wait-for" :arg1-body
|
||||
"with-deps-check" :arg1-body
|
||||
"->" [:noarg1-body
|
||||
{:list {:constant-pair? false :force-nl? false}
|
||||
:next-inner-restore [[:list :constant-pair?]]}]
|
||||
"set!" "reset!"
|
||||
"assoc-when" "assoc"
|
||||
"assoc-some" "assoc"
|
||||
"conj-when" "conj"
|
||||
"conj-some" "conj"}
|
||||
:remove {:fn-force-nl #{:noarg1-body}}
|
||||
:style-map
|
||||
{:no-comma {:map {:comma? false}}
|
||||
{:no-comma {:map {:comma? false}}
|
||||
:custom-justify
|
||||
{:doc "Justify everything using pre-1.1.2 approach"
|
||||
:binding {:justify? true :justify {:max-variance 1000}}
|
||||
|
||||
@@ -14,17 +14,17 @@ 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"; \
|
||||
}
|
||||
%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
|
||||
@@ -32,30 +32,31 @@ 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 easily.
|
||||
# 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
|
||||
# Default metro port used by scripts/run-android.sh.
|
||||
export RCT_METRO_PORT ?= 8081
|
||||
# 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_USER_CONF_FILES = $(PWD)/nix/nix.conf
|
||||
export NIX_CONF_DIR = $(PWD)/nix
|
||||
# Location of symlinks to derivations that should not be garbage collected
|
||||
export _NIX_GCROOTS = ./.nix-gcroots
|
||||
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,\
|
||||
BUILD_TYPE,BUILD_NUMBER,COMMIT_HASH,\
|
||||
ANDROID_GRADLE_OPTS,ANDROID_ABI_SPLIT,ANDROID_ABI_INCLUDE,\
|
||||
STATUS_GO_SRC_OVERRIDE,STATUS_GO_IPFS_GATEWAY_URL
|
||||
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE
|
||||
|
||||
# Useful for Android 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
|
||||
#----------------
|
||||
@@ -80,10 +81,6 @@ nix-gc-protected:
|
||||
@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
|
||||
ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
|
||||
|
||||
nix-upgrade: SHELL := /bin/sh
|
||||
nix-upgrade: ##@nix Upgrade Nix interpreter to current version.
|
||||
nix/scripts/upgrade.sh
|
||||
|
||||
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
|
||||
@@ -104,7 +101,7 @@ 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 := fastlane
|
||||
nix-update-gems: export TARGET := default
|
||||
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
|
||||
fastlane/update.sh
|
||||
|
||||
@@ -139,7 +136,7 @@ _install-hooks: ##@prepare Create prepare-commit-msg git hook symlink
|
||||
|
||||
# Remove directories and ignored files
|
||||
clean: SHELL := /bin/sh
|
||||
clean: _fix-node-perms _tmpdir-rm ios-clean android-clean ##@prepare Remove all output folders
|
||||
clean: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
|
||||
git clean -dXf
|
||||
|
||||
# Remove directories, ignored and non-ignored files
|
||||
@@ -156,12 +153,10 @@ pod-install: export TARGET := ios
|
||||
pod-install: ##@prepare Run 'pod install' to install podfiles and update Podfile.lock
|
||||
cd ios && pod install; cd --
|
||||
|
||||
FLEETS_FILE := ./resources/config/fleets.json
|
||||
update-fleets: ##@prepare Download up-to-date JSON file with current fleets state
|
||||
curl -s https://fleets.status.im/ \
|
||||
| sed 's/"warning": "/"warning": "DO NOT EDIT! /' \
|
||||
> $(FLEETS_FILE)
|
||||
echo >> $(FLEETS_FILE)
|
||||
> resources/config/fleets.json
|
||||
|
||||
$(KEYSTORE_PATH): export TARGET := keytool
|
||||
$(KEYSTORE_PATH):
|
||||
@@ -196,10 +191,6 @@ 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*
|
||||
|
||||
ios-simulator-cache-clean: SHELL := /bin/sh
|
||||
ios-simulator-cache-clean: ##@prepare Clean iOS Simulator Caches
|
||||
rm -rf ~/Library/Developer/CoreSimulator/Cache
|
||||
|
||||
#----------------
|
||||
# Release builds
|
||||
#----------------
|
||||
@@ -214,30 +205,36 @@ build-fdroid: ##@build Build release for F-Droid
|
||||
|
||||
build-android: export BUILD_ENV ?= prod
|
||||
build-android: export BUILD_TYPE ?= nightly
|
||||
build-android: export ORG_GRADLE_PROJECT_versionCode ?= $(TMP_BUILD_NUMBER)
|
||||
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-arm64-v8a-release-unsigned.apk
|
||||
@scripts/sign-android.sh result/app-release-unsigned.apk
|
||||
|
||||
release-ios: export TARGET := ios
|
||||
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
|
||||
release-ios: export BUILD_ENV ?= prod
|
||||
release-ios: watchman-clean ios-clean jsbundle ##@build Build release for iOS release
|
||||
xcodebuild \
|
||||
-scheme StatusIm \
|
||||
-configuration Release \
|
||||
-workspace ios/StatusIm.xcworkspace \
|
||||
-destination 'generic/platform=iOS' \
|
||||
-UseModernBuildSystem=N clean archive
|
||||
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: SHELL := /bin/sh
|
||||
jsbundle: export BUILD_ENV ?= prod
|
||||
jsbundle: ##@build Build JavaScript and Clojurescript bundle for iOS and Android
|
||||
nix/scripts/build.sh targets.mobile.jsbundle
|
||||
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
|
||||
@@ -265,7 +262,7 @@ run-clojure: ##@run Watch for and build Clojure changes for mobile
|
||||
|
||||
run-metro: export TARGET := clojure
|
||||
run-metro: ##@run Start Metro to build React Native changes
|
||||
@scripts/run-metro.sh
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
run-re-frisk: export TARGET := clojure
|
||||
run-re-frisk: ##@run Start re-frisk server
|
||||
@@ -273,27 +270,17 @@ run-re-frisk: ##@run Start re-frisk server
|
||||
|
||||
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
|
||||
run-android: export TARGET := android
|
||||
# Disabled for debug builds to avoid 'maximum call stack exceeded' errors.
|
||||
# https://github.com/status-im/status-mobile/issues/18493
|
||||
run-android: export ORG_GRADLE_PROJECT_hermesEnabled := false
|
||||
run-android: ##@run Build Android APK and start it on the device
|
||||
@scripts/run-android.sh
|
||||
npx react-native run-android --appIdSuffix debug
|
||||
|
||||
SIMULATOR=iPhone 13
|
||||
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
|
||||
run-ios: export TARGET := ios
|
||||
run-ios: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
|
||||
run-ios: ##@run Build iOS app and start it in on the simulator
|
||||
@scripts/run-ios.sh "${SIMULATOR}"
|
||||
|
||||
show-ios-devices: ##@other shows connected ios device and its name
|
||||
xcrun xctrace list devices
|
||||
|
||||
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
|
||||
run-ios-device: export TARGET := ios
|
||||
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
|
||||
run-ios-device: ##@run iOS app and start it on the first connected iPhone
|
||||
@scripts/run-ios-device.sh
|
||||
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
|
||||
@@ -301,120 +288,73 @@ run-ios-device: ##@run iOS app and start it on the first connected iPhone
|
||||
|
||||
# Get all clojure files, including untracked, excluding removed
|
||||
define find_all_clojure_files
|
||||
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -E '((\.clj-kondo\/status-im)|(src).*\.clj[sc]?$$)|((\.clj-kondo\/(status-im|config))|(src).*\.edn$$)|shadow-cljs\.edn')
|
||||
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -e \.clj$$ -e \.cljs$$ -e \.cljc$$ -e \.edn)
|
||||
endef
|
||||
|
||||
lint: export TARGET := clojure
|
||||
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
|
||||
lint: export TARGET := default
|
||||
lint: ##@test Run code style checks
|
||||
@sh scripts/lint/re-frame-in-quo-components.sh && \
|
||||
sh scripts/lint/direct-require-component-outside-quo.sh && \
|
||||
sh scripts/lint/require-i18n-resource-first.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
|
||||
@sh scripts/lint-re-frame-in-quo-components.sh && \
|
||||
clj-kondo --config .clj-kondo/config.edn --cache false --lint src && \
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
scripts/lint/translations.clj && \
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||
sh scripts/lint/trailing-newline.sh && \
|
||||
node_modules/.bin/prettier --check .
|
||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES
|
||||
|
||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||
lint-fix: export TARGET := clojure
|
||||
lint-fix: export TARGET := default
|
||||
lint-fix: ##@test Run code style checks and fix issues
|
||||
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
|
||||
clojure-lsp --ns-exclude-regex ".*/\.clj-kondo/.*|.*/src/status_im/core\.cljs|.*/src/test_helpers/component_tests_preload\.cljs$$" clean-ns && \
|
||||
sh scripts/lint/trailing-newline.sh --fix && \
|
||||
node_modules/.bin/prettier --write .
|
||||
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES
|
||||
|
||||
|
||||
shadow-server: export TARGET := clojure
|
||||
shadow-server:##@ Start shadow-cljs in server mode for watching
|
||||
yarn shadow-cljs server
|
||||
|
||||
_test-clojure: export TARGET := clojure
|
||||
_test-clojure: export WATCH ?= false
|
||||
_test-clojure: status-go-library
|
||||
_test-clojure:
|
||||
ifeq ($(WATCH), true)
|
||||
yarn node-pre-gyp rebuild && \
|
||||
yarn shadow-cljs compile mocks && \
|
||||
nodemon --exec "yarn shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs
|
||||
else
|
||||
yarn node-pre-gyp rebuild && \
|
||||
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-watch-for-repl: export TARGET := clojure
|
||||
test-watch-for-repl: ##@ Watch tests and support REPL connections
|
||||
yarn install
|
||||
rm -f target/test/test.js
|
||||
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
|
||||
'yarn shadow-cljs compile mocks && yarn shadow-cljs watch test --verbose' \
|
||||
'until [ -f ./target/test/test.js ] ; do sleep 1 ; done ; node --require ./test-resources/override.js ./target/test/test.js --repl'
|
||||
|
||||
test: export TARGET := clojure
|
||||
test: ##@test Run tests once in NodeJS
|
||||
# Here we create the gyp bindings for nodejs
|
||||
yarn install
|
||||
yarn shadow-cljs compile mocks && \
|
||||
yarn shadow-cljs compile test && \
|
||||
node --require ./test-resources/override.js "$$SHADOW_OUTPUT_TO"
|
||||
endif
|
||||
node --require ./test-resources/override.js target/test/test.js
|
||||
|
||||
test: export SHADOW_OUTPUT_TO := target/test/test.js
|
||||
test: export SHADOW_NS_REGEXP := .*-test$$
|
||||
test: ##@test Run all Clojure tests
|
||||
test: _test-clojure
|
||||
|
||||
# Note: we need to override the :output-to and :ns-regexp options because
|
||||
# shadow-cljs has a bug where it will not read from the env vars to expand the
|
||||
# configuration when the shadow-cljs mobile target is already running.
|
||||
test-watch-for-repl: export TARGET := default
|
||||
test-watch-for-repl: export SHADOW_OUTPUT_TO := target/test/test.js
|
||||
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
|
||||
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
|
||||
rm -f "$$SHADOW_OUTPUT_TO" && \
|
||||
yarn install && shadow-cljs compile mocks && \
|
||||
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
|
||||
"yarn shadow-cljs watch test --verbose --config-merge '{:output-to \"$(SHADOW_OUTPUT_TO)\" :ns-regexp \"$(SHADOW_NS_REGEXP)\"}'" \
|
||||
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
|
||||
run-visual-test-ios: export TARGET := clojure
|
||||
run-visual-test-ios: XCODE_DERIVED_DATA := $(HOME)/Library/Developer/Xcode/DerivedData
|
||||
run-visual-test-ios: APPLICATION_NAME := StatusIm-brfnruzfrkkycpbndmdoeyrigthc
|
||||
run-visual-test-ios: export TEST_BINARY_PATH := $(XCODE_DERIVED_DATA)/$(APPLICATION_NAME)/Build/Products/Debug-iphonesimulator/StatusIm.app
|
||||
run-visual-test-ios: ##@test Run tests once in NodeJS
|
||||
detox test --configuration ios.sim.debug
|
||||
|
||||
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
|
||||
test-unit: export SHADOW_NS_REGEXP := ^(?!tests\.integration-test)(?!tests\.contract-test).*-test$$
|
||||
test-unit: ##@test Run unit tests
|
||||
test-unit: _test-clojure
|
||||
component-test-watch: export TARGET := clojure
|
||||
component-test-watch: export COMPONENT_TEST := true
|
||||
component-test-watch: export BABEL_ENV := test
|
||||
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
yarn install
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js' -e cljs
|
||||
|
||||
test-integration: export SHADOW_OUTPUT_TO := target/integration_test/test.js
|
||||
test-integration: export SHADOW_NS_REGEXP := ^tests\.integration-test.*$$
|
||||
test-integration: ##@test Run integration tests
|
||||
test-integration: _test-clojure
|
||||
|
||||
test-contract: export SHADOW_OUTPUT_TO := target/contract_test/test.js
|
||||
test-contract: export SHADOW_NS_REGEXP := ^tests\.contract-test.*$$
|
||||
test-contract: ##@test Run contract tests
|
||||
test-contract: _test-clojure
|
||||
|
||||
test-android: jsbundle
|
||||
test-android: export TARGET := android
|
||||
test-android: ##@test Android Gradle test
|
||||
cd android && ./gradlew test
|
||||
|
||||
test-component-watch: export TARGET := clojure
|
||||
test-component-watch: export COMPONENT_TEST := true
|
||||
test-component-watch: export BABEL_ENV := test
|
||||
test-component-watch: export JEST_USE_SILENT_REPORTER := false
|
||||
test-component-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||
|
||||
test-component: export TARGET := clojure
|
||||
test-component: export COMPONENT_TEST := true
|
||||
test-component: export BABEL_ENV := test
|
||||
test-component: export JEST_USE_SILENT_REPORTER := false
|
||||
test-component: ##@test Run component tests once in NodeJS
|
||||
@scripts/check-metro-shadow-process.sh
|
||||
rm -rf ./component-spec
|
||||
component-test: export TARGET := clojure
|
||||
component-test: export COMPONENT_TEST := true
|
||||
component-test: export BABEL_ENV := test
|
||||
component-test: ##@test Run tests once in NodeJS
|
||||
# Here we create the gyp bindings for nodejs
|
||||
yarn install
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||
jest --config=test/jest/jest.config.js
|
||||
|
||||
# Reference: https://flow-storm.github.io/flow-storm-debugger/user_guide.html#_debugging_react_native_applications
|
||||
run-flow-storm: export SHADOW_CLJS_BUILD_ID := :mobile
|
||||
run-flow-storm: export TARGET := clojure
|
||||
run-flow-storm: export GDK_DPI_SCALE := 1.0
|
||||
run-flow-storm: ##@run Start FlowStorm debugger
|
||||
clj -Sforce -Sdeps '{:deps {com.github.jpmonettas/flow-storm-dbg {:mvn/version "3.7.5"}}}' \
|
||||
-X flow-storm.debugger.main/start-debugger \
|
||||
:port 7888 \
|
||||
:repl-type :shadow \
|
||||
:build-id $(SHADOW_CLJS_BUILD_ID)
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
|
||||
@@ -423,49 +363,22 @@ geth-connect: ##@other Connect to Geth on the device
|
||||
adb forward tcp:8545 tcp:8545 && \
|
||||
build/bin/geth attach http://localhost:8545
|
||||
|
||||
ios-clean: SHELL := /bin/sh
|
||||
ios-clean: ios-simulator-cache-clean
|
||||
ios-clean: ##@prepare Clean iOS build artifacts
|
||||
git clean -dxf -f target/ios
|
||||
|
||||
android-clean: SHELL := /bin/sh
|
||||
android-clean: export TARGET := gradle
|
||||
android-clean: ##@prepare Clean Gradle state
|
||||
git clean -dxf -f ./android/app/build; \
|
||||
rm -rf android/.gradle \
|
||||
rm -rf android/build \
|
||||
rm -rf ~/.gradle
|
||||
[[ -d android/.gradle ]] && cd android && ./gradlew clean
|
||||
|
||||
|
||||
android-ports: export FLOWSTORM_PORT ?= 7722
|
||||
android-ports: export TARGET := android-sdk
|
||||
android-ports: export RCT_METRO_PORT ?= 8081
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:$(RCT_METRO_PORT) tcp:$(RCT_METRO_PORT) && \
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
|
||||
adb forward tcp:5561 tcp:5561
|
||||
|
||||
android-devices: export TARGET := android-sdk
|
||||
android-devices: ##@other Invoke adb devices
|
||||
adb devices
|
||||
|
||||
android-pull-geth: export TARGET := android-sdk
|
||||
android-pull-geth: export VERSION ?= debug
|
||||
android-pull-geth:
|
||||
adb pull "/storage/emulated/0/Android/data/im.status.ethereum$$( [ "$(VERSION)" = "release" ] || echo ".$(VERSION)" )/files/Download/geth.log"
|
||||
|
||||
android-tail-geth: export TARGET := android-sdk
|
||||
android-tail-geth: export VERSION ?= debug
|
||||
android-tail-geth:
|
||||
adb shell 'while true; do cat; sleep 1; done < /storage/emulated/0/Android/data/im.status.ethereum$$( [ "$(VERSION)" = "release" ] || echo ".$(VERSION)" )/files/Download/geth.log'
|
||||
|
||||
android-clean-geth: export TARGET := android-sdk
|
||||
android-clean-geth: export VERSION ?= debug
|
||||
android-clean-geth:
|
||||
adb shell 'rm /storage/emulated/0/Android/data/im.status.ethereum$$( [ "$(VERSION)" = "release" ] || echo ".$(VERSION)" )/files/Download/geth.log'
|
||||
|
||||
|
||||
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 :'
|
||||
@@ -479,10 +392,6 @@ _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 '^$@$$'
|
||||
|
||||
patch-file: export TARGET := default
|
||||
patch-file: ##@other Generates patch file for npm deps
|
||||
@scripts/patch-npm-lib.sh
|
||||
|
||||
#--------------
|
||||
# REPLs
|
||||
#--------------
|
||||
@@ -492,18 +401,3 @@ 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
|
||||
|
||||
#--------------
|
||||
# Dev Automation Flows
|
||||
#--------------
|
||||
|
||||
auto-login: export TARGET := default
|
||||
auto-login: ##@auto runs flow for login or onboarding app on simulator/emulator
|
||||
maestro test "maestro/create-account-or-login.yaml"
|
||||
|
||||
auto-custom: export TARGET := default
|
||||
auto-custom: ##@auto runs any custom maestro automation flow on simulator/emulator
|
||||
ifndef FLOW
|
||||
$(error Usage: make automate FLOW=your-maestro-flow-file.yaml)
|
||||
endif
|
||||
maestro test "$(FLOW)"
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
|
||||
[<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)
|
||||
|
||||
|
||||
[Get it on Github](https://github.com/status-im/status-mobile/releases)
|
||||
|
||||
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 middlemen and `go-ethereum` running directly on your device.
|
||||
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")
|
||||
|
||||
@@ -14,49 +12,52 @@ Join us in creating a browser, messenger, and gateway to a decentralized world.
|
||||
|
||||
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, and the way we conduct ourselves privately and promote this way of life to a mass audience.
|
||||
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 provide us with 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](doc/) and choose what interests you:
|
||||
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:
|
||||
|
||||
- **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](doc/starting-guide.md) which guides you
|
||||
[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](doc/starting-guide.md), which talks about managing
|
||||
project dependencies, coding guidelines and testing procedures.
|
||||
Check out our [coding guidelines](doc/new-guidelines.md).
|
||||
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.
|
||||
|
||||
- **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 the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.app/manifesto)
|
||||
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)
|
||||
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said, "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
|
||||
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.
|
||||
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
|
||||
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!
|
||||
|
||||
- **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](doc/starting-guide.md) or if an android user checks 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!
|
||||
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!
|
||||
|
||||
- **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)
|
||||
|
||||
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)
|
||||
|
||||
## 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).
|
||||
|
||||
## Give me Binaries!
|
||||
|
||||
You can get our Beta builds for both Android and iOS on our [website](https://status.app), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](doc/starting-guide.md).
|
||||
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/).
|
||||
|
||||
## Core Contributors
|
||||
|
||||
@@ -67,8 +68,12 @@ Without the dedication of these outstanding individuals, Status would not exist.
|
||||
|
||||
## Contact us
|
||||
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im).
|
||||
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).
|
||||
|
||||
## 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)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
### Redesign
|
||||
|
||||
* quo, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* Quo2, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
|
||||
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
|
||||
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
|
||||
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
|
||||
|
||||
@@ -1,75 +1,124 @@
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "org.jetbrains.kotlin.android"
|
||||
apply plugin: "com.facebook.react"
|
||||
|
||||
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
|
||||
* 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
|
||||
* and their defaults. If you decide to add a configuration block, make sure to add it before the
|
||||
* `apply from: "../../node_modules/react-native/react.gradle"` line.
|
||||
*
|
||||
* project.ext.react = [
|
||||
* // the name of the generated asset file containing your JS bundle
|
||||
* bundleAssetName: "index.android.bundle",
|
||||
*
|
||||
* // the entry file for bundle generation
|
||||
* entryFile: "index.js",
|
||||
*
|
||||
* // whether to bundle JS and assets in debug mode
|
||||
* bundleInDebug: false,
|
||||
*
|
||||
* // whether to bundle JS and assets in release mode
|
||||
* bundleInRelease: true,
|
||||
*
|
||||
* // whether to bundle JS and assets in another build variant (if configured).
|
||||
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'bundleIn${productFlavor}${buildType}'
|
||||
* // 'bundleIn${buildType}'
|
||||
* // bundleInFreeDebug: true,
|
||||
* // 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: "../../",
|
||||
*
|
||||
* // where to put the JS bundle asset in debug mode
|
||||
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
|
||||
*
|
||||
* // where to put the JS bundle asset in release mode
|
||||
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in debug mode
|
||||
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
|
||||
*
|
||||
* // where to put drawable resources / React Native assets, e.g. the ones you use via
|
||||
* // require('./image.png')), in release mode
|
||||
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
|
||||
*
|
||||
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
|
||||
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
|
||||
* // 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: []
|
||||
* ]
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is the configuration block to customize your React Native Android app.
|
||||
* By default you don't need to apply any configuration, just uncomment the lines you need.
|
||||
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
|
||||
*/
|
||||
react {
|
||||
/* Folders */
|
||||
// The root of your project, i.e. where "package.json" lives. Default is '..'
|
||||
// root = file("../")
|
||||
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
|
||||
// reactNativeDir = file("../node_modules/react-native")
|
||||
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
|
||||
// codegenDir = file("../node_modules/@react-native/codegen")
|
||||
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
|
||||
// cliFile = file("../node_modules/react-native/cli.js")
|
||||
|
||||
/* Variants */
|
||||
// The list of variants to that are debuggable. For those we're going to
|
||||
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
|
||||
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
|
||||
// debuggableVariants = ["liteDebug", "prodDebug"]
|
||||
def disableHermes = System.getenv('DISABLE_HERMES') == 'true'
|
||||
|
||||
/* Bundling */
|
||||
// A list containing the node command and its flags. Default is just 'node'.
|
||||
nodeExecutableAndArgs = ["node", "--max-old-space-size=16384" ]
|
||||
//
|
||||
// The command to run when bundling. By default is 'bundle'
|
||||
// bundleCommand = "ram-bundle"
|
||||
//
|
||||
// The path to the CLI configuration file. Default is empty.
|
||||
// bundleConfig = file(../rn-cli.config.js)
|
||||
//
|
||||
// The name of the generated asset file containing your JS bundle
|
||||
// bundleAssetName = "MyApplication.android.bundle"
|
||||
//
|
||||
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
|
||||
// entryFile = file("../js/MyApplication.android.js")
|
||||
//
|
||||
// A list of extra flags to pass to the 'bundle' commands.
|
||||
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
|
||||
// extraPackagerArgs = []
|
||||
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/**"]
|
||||
]
|
||||
|
||||
/* Hermes Commands */
|
||||
// The hermes compiler command to run. By default it is 'hermesc'
|
||||
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
|
||||
//
|
||||
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
|
||||
// hermesFlags = ["-O", "-output-source-map"]
|
||||
}
|
||||
// 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 Run Proguard on Release builds to minify the Java bytecode.
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = true
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
/**
|
||||
* The preferred build flavor of JavaScriptCore (JSC)
|
||||
* 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
|
||||
* 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:+'
|
||||
@@ -81,7 +130,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
* 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 = hermesEnabled.toBoolean();
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
def getCommitHash = { ->
|
||||
if (project.hasProperty("commitHash")) {
|
||||
@@ -107,13 +156,12 @@ def getVersionCode = { ->
|
||||
|
||||
def getVersionName = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
// TODO: probably not used, cleanup
|
||||
if (project.hasProperty("releaseVersion")) {
|
||||
return project.releaseVersion
|
||||
}
|
||||
/* Necessary because Android Studio uses wrong PWD.
|
||||
* Is actually absolute directory path of this file. */
|
||||
def configDir = project.projectDir.toString()
|
||||
def configDir = project.projectDir.toString()
|
||||
version = new File(configDir + '/../../VERSION').text
|
||||
return version.replaceAll("\\s","")
|
||||
}
|
||||
@@ -135,29 +183,13 @@ def getEnvOrConfig = { varName ->
|
||||
}
|
||||
|
||||
android {
|
||||
ndkVersion rootProject.ext.ndkVersion
|
||||
|
||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
||||
compileSdk rootProject.ext.compileSdkVersion
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
// https://developer.android.com/studio/projects/install-ndk#vanilla_cmake
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
// This version must match cmakeVersions inside nix/pkgs/android-sdk/compose.nix
|
||||
version "3.22.1"
|
||||
}
|
||||
}
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
namespace "im.status.ethereum"
|
||||
defaultConfig {
|
||||
applicationId "im.status.ethereum"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
@@ -174,7 +206,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Arbitrary project metadata
|
||||
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
|
||||
@@ -206,12 +237,16 @@ android {
|
||||
doNotStrip '*/mips/*.so'
|
||||
doNotStrip '*/mips64/*.so'
|
||||
}
|
||||
dexOptions {
|
||||
jumboMode true
|
||||
javaMaxHeapSize "8g"
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
reset()
|
||||
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
|
||||
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||
universalApk false
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
signingConfigs {
|
||||
@@ -232,7 +267,6 @@ android {
|
||||
}
|
||||
release {
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
shrinkResources enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
signingConfig null
|
||||
}
|
||||
@@ -240,13 +274,12 @@ android {
|
||||
initWith release
|
||||
applicationIdSuffix ".pr"
|
||||
versionNameSuffix ".pr"
|
||||
debuggable false
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
}
|
||||
}
|
||||
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
@@ -262,7 +295,6 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
@@ -274,34 +306,50 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
implementation("com.facebook.react:react-android")
|
||||
implementation("androidx.core:core-splashscreen:1.0.0")
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
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) {
|
||||
implementation("com.facebook.react:hermes-android")
|
||||
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 {
|
||||
// https://github.com/status-im/status-mobile/issues/18493
|
||||
// we don't use hermes for debug builds because it crashes too often
|
||||
implementation(jscFlavor)
|
||||
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") // required by status-mobile/android/app/src/main/java/im/status/ethereum/MainApplication.java
|
||||
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.5.0")
|
||||
implementation("com.facebook.fresco:animated-gif:2.5.0")
|
||||
implementation("com.squareup.okhttp3:okhttp-tls:4.11.0")
|
||||
implementation("com.google.prefab:cli:2.0.0")
|
||||
implementation("com.android.tools.build:aapt2:8.1.1-10154469")
|
||||
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"
|
||||
}
|
||||
|
||||
|
||||
def getLocalNDKDir = { ->
|
||||
def rootDir = project.rootDir
|
||||
def localProperties = new File(rootDir, "local.properties")
|
||||
|
||||
@@ -58,9 +58,6 @@
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
# to fix : java.security.KeyStoreException: BKS not found
|
||||
-keep class org.bouncycastle.** { *; }
|
||||
|
||||
# okio
|
||||
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
@@ -78,13 +75,4 @@
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
|
||||
# react-native-config
|
||||
# https://github.com/lugg/react-native-config?tab=readme-ov-file#problems-with-proguard
|
||||
-keep class im.status.ethereum.BuildConfig {*;}
|
||||
|
||||
# react-native-navigation
|
||||
# to fix : java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
|
||||
# at com.reactnativenavigation.views.element.animators.PropertyAnimatorCreator.getChildClass(Unknown Source:13)
|
||||
-keep class com.reactnativenavigation.** {*;}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
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 android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
<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" />
|
||||
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
|
||||
</manifest>
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,10 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:installLocation="auto">
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent>
|
||||
</queries>
|
||||
android:installLocation="auto"
|
||||
package="im.status.ethereum">
|
||||
|
||||
<!-- non-dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE"/>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
@@ -24,11 +17,11 @@
|
||||
<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.READ_MEDIA_IMAGES"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||
android:maxSdkVersion="28" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
|
||||
<application
|
||||
@@ -36,23 +29,18 @@
|
||||
android:allowBackup="false"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:theme="@style/AppTheme"
|
||||
android:name=".MainApplication"
|
||||
android:largeHeap="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
<!-- After upgrading Android Gradle Plugin to 4.2.0 and above we must get rid of `extractNativeLibs="true"`
|
||||
and use`useLegacyPackaging` flag in our app's `build.gradle`-->
|
||||
android:usesCleartextTraffic="true">
|
||||
<meta-data android:name="commitHash" android:value="${commitHash}"/>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.AppSplash"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:resizeableActivity="false"
|
||||
android:launchMode="singleTask">
|
||||
<intent-filter>
|
||||
@@ -70,47 +58,19 @@
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<!-- Handles http and https URLs for status.app -->
|
||||
<data android:scheme="http" android:host="status.app" />
|
||||
<data android:scheme="https" android:host="status.app" />
|
||||
<!-- Community paths -->
|
||||
<data android:pathPattern="/c/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/c/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- Community channel paths -->
|
||||
<data android:pathPattern="/cc/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/cc/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- User paths -->
|
||||
<data android:pathPattern="/u/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/u/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- Private chat paths -->
|
||||
<data android:pathPattern="/p/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/p/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- Community request paths -->
|
||||
<data android:pathPattern="/cr/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/cr/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- Group chat paths -->
|
||||
<data android:pathPattern="/g/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/g/.*" android:host="status.app" android:scheme="https" />
|
||||
<!-- Wallet paths -->
|
||||
<data android:pathPattern="/wallet/.*" android:host="status.app" android:scheme="http" />
|
||||
<data android:pathPattern="/wallet/.*" android:host="status.app" android:scheme="https" />
|
||||
<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-app" />
|
||||
<data android:scheme="status-im" />
|
||||
<data android:scheme="ethereum" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||
<service
|
||||
android:name="im.status.ethereum.pushnotifications.ForegroundService"
|
||||
android:foregroundServiceType="specialUse">
|
||||
<property
|
||||
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
||||
android:value="local notifications"/>
|
||||
</service>
|
||||
<service android:name="im.status.ethereum.pushnotifications.ForegroundService"></service>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
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.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
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 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;
|
||||
|
||||
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() {
|
||||
Looper.prepare();
|
||||
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle("Error")
|
||||
.setMessage(t.toString())
|
||||
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
|
||||
public void onClick(final DialogInterface dialog, final int id) {
|
||||
dialog.dismiss();
|
||||
defaultUncaughtExceptionHandler.uncaughtException(thread, t);
|
||||
}
|
||||
}).show();
|
||||
|
||||
Looper.loop();
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private ActivityManager getActivityManager() {
|
||||
return (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
|
||||
}
|
||||
|
||||
private ActivityManager.MemoryInfo getAvailableMemory(final ActivityManager activityManager) {
|
||||
final ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
|
||||
activityManager.getMemoryInfo(memoryInfo);
|
||||
return memoryInfo;
|
||||
}
|
||||
|
||||
protected void configureStatus() {
|
||||
// Required because of crazy APN settings redirecting localhost (found in GB)
|
||||
Properties properties = System.getProperties();
|
||||
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1");
|
||||
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);
|
||||
|
||||
// Report memory details for this application
|
||||
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);
|
||||
|
||||
if (!shouldShowRootedNotification()) {
|
||||
configureStatus();
|
||||
} else {
|
||||
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)
|
||||
.setMessage(getResources().getString(R.string.root_warning))
|
||||
.setPositiveButton(getResources().getString(R.string.root_okay), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
rejectRootedNotification();
|
||||
dialog.dismiss();
|
||||
configureStatus();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(getResources().getString(R.string.root_cancel), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
dialog.dismiss();
|
||||
MainActivity.this.finishAffinity();
|
||||
}
|
||||
})
|
||||
.setOnCancelListener(new OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
dialog.dismiss();
|
||||
MainActivity.this.finishAffinity();
|
||||
}
|
||||
})
|
||||
.create();
|
||||
|
||||
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
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
super.onConfigurationChanged(newConfig);
|
||||
Intent intent = new Intent("onConfigurationChanged");
|
||||
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,236 +0,0 @@
|
||||
package im.status.ethereum
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.app.ActivityManager
|
||||
import android.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.content.DialogInterface
|
||||
import android.content.Intent
|
||||
import android.content.SharedPreferences
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.res.Configuration
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.preference.PreferenceManager
|
||||
import android.provider.Settings
|
||||
import android.util.Log
|
||||
import android.view.WindowManager
|
||||
import androidx.annotation.Nullable
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import com.facebook.react.ReactActivityDelegate
|
||||
import com.facebook.react.bridge.Arguments
|
||||
import com.facebook.react.bridge.WritableMap
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||
import com.facebook.react.modules.core.DeviceEventManagerModule
|
||||
import com.facebook.react.modules.core.PermissionListener
|
||||
import com.reactnativenavigation.NavigationActivity
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView
|
||||
import im.status.ethereum.MainApplication
|
||||
import im.status.ethereum.module.StatusThreadPoolExecutor
|
||||
import java.util.Properties
|
||||
|
||||
class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsResultCallback {
|
||||
|
||||
@Nullable
|
||||
private var mPermissionListener: PermissionListener? = null
|
||||
private var keepSplash = true
|
||||
private val SPLASH_DELAY = 3200
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||
* rendering of the component.
|
||||
*/
|
||||
protected fun getMainComponentName(): String {
|
||||
return "StatusIm"
|
||||
}
|
||||
|
||||
private fun registerUncaughtExceptionHandler(context: Context) {
|
||||
val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
|
||||
// High priority, so don't use StatusThreadPoolExecutor
|
||||
Thread.setDefaultUncaughtExceptionHandler { thread, t ->
|
||||
Thread {
|
||||
Looper.prepare()
|
||||
AlertDialog.Builder(context)
|
||||
.setTitle("Error")
|
||||
.setMessage(t.toString())
|
||||
.setNegativeButton("Exit") { dialog, id ->
|
||||
dialog.dismiss()
|
||||
defaultUncaughtExceptionHandler.uncaughtException(thread, t)
|
||||
}.show()
|
||||
Looper.loop()
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun getActivityManager(): ActivityManager {
|
||||
return getSystemService(ACTIVITY_SERVICE) as ActivityManager
|
||||
}
|
||||
|
||||
private fun getAvailableMemory(activityManager: ActivityManager): ActivityManager.MemoryInfo {
|
||||
val memoryInfo = ActivityManager.MemoryInfo()
|
||||
activityManager.getMemoryInfo(memoryInfo)
|
||||
return memoryInfo
|
||||
}
|
||||
|
||||
protected fun configureStatus() {
|
||||
// Required because of crazy APN settings redirecting localhost (found in GB)
|
||||
val properties = System.getProperties()
|
||||
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1")
|
||||
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1")
|
||||
}
|
||||
|
||||
private fun createNotificationSettingsIntent(): Intent {
|
||||
val intent = Intent()
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent.action = Settings.ACTION_APP_NOTIFICATION_SETTINGS
|
||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName)
|
||||
} else {
|
||||
intent.action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS
|
||||
intent.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
intent.data = Uri.parse("package:$packageName")
|
||||
}
|
||||
return intent
|
||||
}
|
||||
|
||||
private fun tryToEmit(eventName: String, event: WritableMap) {
|
||||
try {
|
||||
(getApplication() as MainApplication).reactNativeHost
|
||||
.getReactInstanceManager()
|
||||
.getCurrentReactContext()
|
||||
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
||||
?.emit("url", event)
|
||||
} catch (e: Exception) { // we expect NPE on first start, which is OK because we have a fallback
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
if (intent.dataString != null && intent.data!!.scheme!!.startsWith("app-settings")) {
|
||||
startActivity(createNotificationSettingsIntent())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
val splashScreen = installSplashScreen();
|
||||
setTheme(R.style.DarkTheme)
|
||||
// Make sure we get an Alert for every uncaught exceptions
|
||||
registerUncaughtExceptionHandler(this)
|
||||
|
||||
// Report memory details for this application
|
||||
val activityManager = getActivityManager()
|
||||
Log.v("RNBootstrap", "Available system memory " + getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.largeMemoryClass + "M")
|
||||
|
||||
setSecureFlag()
|
||||
|
||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||
super.onCreate(null)
|
||||
|
||||
if (!shouldShowRootedNotification()) {
|
||||
configureStatus()
|
||||
} else {
|
||||
val dialog = AlertDialog.Builder(this)
|
||||
.setMessage(resources.getString(R.string.root_warning))
|
||||
.setPositiveButton(resources.getString(R.string.root_okay)) { dialog, which ->
|
||||
rejectRootedNotification()
|
||||
dialog.dismiss()
|
||||
configureStatus()
|
||||
}
|
||||
.setNegativeButton(resources.getString(R.string.root_cancel)) { dialog, which ->
|
||||
dialog.dismiss()
|
||||
finishAffinity()
|
||||
}
|
||||
.setOnCancelListener {
|
||||
it.dismiss()
|
||||
finishAffinity()
|
||||
}
|
||||
.create()
|
||||
|
||||
dialog.show()
|
||||
}
|
||||
|
||||
val r = Runnable {
|
||||
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 (intent.data != null) {
|
||||
val event = Arguments.createMap()
|
||||
event.putString("url", intent.dataString)
|
||||
// on first start emit will (silently) fail, but the regular deep linking handler will work
|
||||
tryToEmit("url", event)
|
||||
}
|
||||
}
|
||||
|
||||
splashScreen.setKeepOnScreenCondition { keepSplash }
|
||||
|
||||
val handler = Handler()
|
||||
handler.postDelayed({ keepSplash = false }, SPLASH_DELAY.toLong())
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(r)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
}
|
||||
|
||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
||||
super.onConfigurationChanged(newConfig)
|
||||
val intent = Intent("onConfigurationChanged")
|
||||
intent.putExtra("newConfig", newConfig)
|
||||
sendBroadcast(intent)
|
||||
}
|
||||
|
||||
private val REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification"
|
||||
private val FREQUENCY_OF_REMINDER_IN_PERCENT = 5
|
||||
|
||||
private fun shouldShowRootedNotification(): Boolean {
|
||||
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
|
||||
return if (userRejectedRootedNotification()) {
|
||||
(Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT
|
||||
} else true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
private fun userRejectedRootedNotification(): Boolean {
|
||||
val preferences = getPreferences(0)
|
||||
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false)
|
||||
}
|
||||
|
||||
private fun rejectRootedNotification() {
|
||||
val preferences = getPreferences(0)
|
||||
val editor = preferences.edit()
|
||||
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true)
|
||||
editor.commit()
|
||||
}
|
||||
|
||||
private fun setSecureFlag() {
|
||||
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
|
||||
val setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
|
||||
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
} else {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
override fun requestPermissions(permissions: Array<String>, requestCode: Int, listener: PermissionListener) {
|
||||
mPermissionListener = listener
|
||||
super.requestPermissions(permissions, requestCode)
|
||||
}
|
||||
|
||||
|
||||
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
|
||||
if (mPermissionListener != null && mPermissionListener!!.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
|
||||
mPermissionListener = null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
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 com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import cl.json.RNSharePackage;
|
||||
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 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;
|
||||
|
||||
import com.facebook.react.bridge.JSIModulePackage;
|
||||
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
|
||||
|
||||
public class MainApplication extends NavigationApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost = new NavigationReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
|
||||
|
||||
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
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
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,59 +0,0 @@
|
||||
package im.status.ethereum
|
||||
|
||||
import android.webkit.WebView
|
||||
import androidx.multidex.MultiDexApplication
|
||||
import com.facebook.react.PackageList
|
||||
import com.facebook.react.ReactApplication
|
||||
import com.facebook.react.ReactNativeHost
|
||||
import com.facebook.react.ReactPackage
|
||||
import com.facebook.react.bridge.JSIModulePackage
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
|
||||
import com.facebook.react.modules.network.OkHttpClientProvider
|
||||
import com.reactnativenavigation.NavigationApplication
|
||||
import com.reactnativenavigation.react.NavigationReactNativeHost
|
||||
import cl.json.RNSharePackage
|
||||
import com.reactnativecommunity.blurview.BlurViewPackage
|
||||
import im.status.ethereum.keycard.RNStatusKeycardPackage
|
||||
import im.status.ethereum.module.StatusPackage
|
||||
import im.status.ethereum.pushnotifications.PushNotificationPackage
|
||||
import im.status.ethereum.StatusOkHttpClientFactory
|
||||
|
||||
class MainApplication : NavigationApplication() {
|
||||
|
||||
private val mReactNativeHost = object : NavigationReactNativeHost(this) {
|
||||
override fun getUseDeveloperSupport(): Boolean {
|
||||
return BuildConfig.DEBUG
|
||||
}
|
||||
|
||||
override fun getPackages(): List<ReactPackage> =
|
||||
PackageList(this).packages.apply {
|
||||
// Packages that cannot be autolinked yet can be added manually here
|
||||
add(StatusPackage(RootUtil.isDeviceRooted()))
|
||||
add(RNStatusKeycardPackage())
|
||||
add(PushNotificationPackage())
|
||||
add(BlurViewPackage())
|
||||
}
|
||||
|
||||
override fun getJSMainModuleName(): String = "index"
|
||||
|
||||
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
||||
|
||||
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
||||
}
|
||||
|
||||
override val reactNativeHost: ReactNativeHost
|
||||
get() = mReactNativeHost
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
|
||||
OkHttpClientProvider.setOkHttpClientFactory(StatusOkHttpClientFactory())
|
||||
|
||||
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1")
|
||||
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
DefaultNewArchitectureEntryPoint.load()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,88 +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.tls.HandshakeCertificates
|
||||
import java.io.ByteArrayInputStream
|
||||
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 : OkHttpClientFactory {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "StatusOkHttpClientFactory"
|
||||
private const val SLEEP_DURATION = 500L // milliseconds
|
||||
}
|
||||
|
||||
override fun createNewNetworkModuleClient(): OkHttpClient? {
|
||||
val certPem = getCertificatePem().takeIf { it.isNotEmpty() }
|
||||
?: return logAndReturnNull("Certificate is empty, cannot create OkHttpClient without a valid certificate")
|
||||
|
||||
val cert = try {
|
||||
induceSleep()
|
||||
// Convert PEM certificate string to X509Certificate object
|
||||
CertificateFactory.getInstance("X.509")
|
||||
.generateCertificate(ByteArrayInputStream(certPem.toByteArray())) as? X509Certificate
|
||||
?: return logAndReturnNull("Certificate could not be parsed as non-null")
|
||||
} catch (e: Exception) {
|
||||
return logAndReturnNull("Could not parse certificate", e)
|
||||
}
|
||||
|
||||
val clientCertificates = try {
|
||||
induceSleep()
|
||||
// Create HandshakeCertificates object with our certificate
|
||||
HandshakeCertificates.Builder()
|
||||
.addPlatformTrustedCertificates()
|
||||
.addTrustedCertificate(cert)
|
||||
.build()
|
||||
} catch (e: Exception) {
|
||||
return logAndReturnNull("Could not build HandshakeCertificates", e)
|
||||
}
|
||||
|
||||
return try {
|
||||
OkHttpClientProvider.createClientBuilder()
|
||||
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
|
||||
.build()
|
||||
} catch (e: Exception) {
|
||||
logAndReturnNull("Could not create OkHttpClient", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCertificatePem(): String {
|
||||
return try {
|
||||
// Create OkHttpClient with custom SSL socket factory and trust manager
|
||||
StatusPackage.getImageTLSCert().takeIf { !it.isNullOrBlank() }
|
||||
?: logAndReturnEmpty("Certificate PEM string is null or empty")
|
||||
} catch (e: Exception) {
|
||||
logAndReturnEmpty("Could not getImageTLSCert", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun induceSleep() {
|
||||
try {
|
||||
// induce half second sleep because sometimes a cert is not immediately available
|
||||
// TODO : remove sleep if App no longer crashes on Android 10 devices with
|
||||
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
|
||||
Thread.sleep(SLEEP_DURATION)
|
||||
} catch (e: InterruptedException) {
|
||||
Log.e(TAG, "Sleep interrupted", e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun logAndReturnNull(message: String, e: Exception? = null): Nothing? {
|
||||
Log.e(TAG, message, e)
|
||||
return null
|
||||
}
|
||||
|
||||
private fun logAndReturnEmpty(message: String, e: Exception? = null): String {
|
||||
Log.e(TAG, message, e)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -2,6 +2,4 @@
|
||||
<resources>
|
||||
<color name="alert_background">#ffffff</color>
|
||||
<color name="alert_text">#000000</color>
|
||||
<color name="splash_background">#09101C</color>
|
||||
<color name="splash_status_bar_color">#ffffff</color>
|
||||
</resources>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<style name="Theme.AppSplash" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/splash_background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_logo</item>
|
||||
<item name="windowSplashScreenAnimationDuration">1000</item>
|
||||
|
||||
<!-- Status bar and Nav bar configs -->
|
||||
<item name="android:statusBarColor" tools:targetApi="l">@color/splash_background</item>
|
||||
<item name="android:windowLightStatusBar">false</item>
|
||||
|
||||
<item name="postSplashScreenTheme">@style/DarkTheme</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -4,20 +4,13 @@
|
||||
* Project-wide gradle configuration properties for use by all modules
|
||||
*/
|
||||
ext {
|
||||
// kotlin_version is needed for react-native-camera-kit library
|
||||
kotlin_version = project.kotlinPluginVersion
|
||||
RNNKotlinVersion = project.kotlinPluginVersion
|
||||
RNGH_kotlinVersion = project.kotlinPluginVersion
|
||||
RNNKotlinVersion = "1.4.31"
|
||||
buildToolsVersion = project.buildToolsVersion
|
||||
minSdkVersion = Integer.valueOf(project.minSdkVersion)
|
||||
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
|
||||
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
|
||||
supportLibVersion = project.supportLibVersion
|
||||
gradlePluginVersion = project.gradlePluginVersion
|
||||
kotlinVersion = project.kotlinPluginVersion
|
||||
kotlinPluginVersion = project.kotlinPluginVersion
|
||||
kotlinToolsVersion = project.kotlinPluginVersion
|
||||
ndkVersion = "25.2.9519653"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
@@ -27,10 +20,10 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
|
||||
classpath("com.android.tools.build:gradle")
|
||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31"
|
||||
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
|
||||
// WARNING: Do not place your application dependencies here!
|
||||
// They belong in the individual module build.gradle files.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,44 +37,30 @@ subprojects {
|
||||
defaultConfig {
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
}
|
||||
|
||||
// Speed up Tests Stage
|
||||
tasks.withType(Test).configureEach {
|
||||
// https://docs.gradle.org/current/userguide/performance.html#execute_tests_in_parallel
|
||||
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
|
||||
// https://docs.gradle.org/current/userguide/performance.html#fork_tests_into_multiple_processes
|
||||
forkEvery = 100
|
||||
// https://docs.gradle.org/current/userguide/performance.html#disable_reports
|
||||
reports.html.required = false
|
||||
reports.junitXml.required = false
|
||||
}
|
||||
// Speed up Java Compile Stage
|
||||
// https://docs.gradle.org/current/userguide/performance.html#run_the_compiler_as_a_separate_process
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.fork = true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "com.facebook.react.rootproject"
|
||||
|
||||
allprojects {
|
||||
beforeEvaluate {
|
||||
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
|
||||
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
maven { url("$rootDir/../node_modules/react-native/android") }
|
||||
// Android JSC is installed from npm
|
||||
maven { url("$rootDir/../node_modules/jsc-android/dist") }
|
||||
// For geth, function, and status-go
|
||||
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
|
||||
// Everything Else
|
||||
google()
|
||||
jcenter() // Required for @react-native-community/blur:3.6.1, can be removed after updating to 3.6.1+
|
||||
mavenCentral()
|
||||
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
|
||||
maven { url "https://www.jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status
|
||||
|
||||
# Version requirements used throughout the Gradle scripts
|
||||
minSdkVersion=24
|
||||
compileSdkVersion=34
|
||||
targetSdkVersion=34
|
||||
buildToolsVersion=34.0.0
|
||||
kotlinVersion=1.3.50
|
||||
minSdkVersion=23
|
||||
compileSdkVersion=31
|
||||
targetSdkVersion=31
|
||||
buildToolsVersion=31.0.0
|
||||
supportLibVersion=28.0.0
|
||||
# This should match version from nix/pkgs/aapt2/default.nix
|
||||
gradlePluginVersion=7.4.2
|
||||
kotlinPluginVersion=1.9.0
|
||||
# This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix
|
||||
gradlePluginVersion=3.5.4
|
||||
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -38,25 +38,15 @@ KEYSTORE_PASSWORD=password
|
||||
KEYSTORE_ALIAS=status
|
||||
KEYSTORE_KEY_PASSWORD=password
|
||||
|
||||
# Splitting by CPU Architecture produces smaller APKs.
|
||||
ANDROID_ABI_SPLIT=true
|
||||
# By default its better to only build apk for most recent devices.
|
||||
ANDROID_ABI_INCLUDE=arm64-v8a
|
||||
# By default we build a mostly universal APK
|
||||
ANDROID_ABI_SPLIT=false
|
||||
# Some platforms are excluded though
|
||||
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86
|
||||
|
||||
org.gradle.jvmargs=-Xmx8704M -XX:+UseParallelGC
|
||||
org.gradle.jvmargs=-Xmx8704M
|
||||
|
||||
versionCode=9999
|
||||
commitHash=unknown
|
||||
|
||||
# Use this property to enable support to the new architecture.
|
||||
# This will allow you to use TurboModules and the Fabric render in
|
||||
# your application. You should enable this flag either if you want
|
||||
# to write custom TurboModules/Fabric components OR use libraries that
|
||||
# are providing them.
|
||||
newArchEnabled=false
|
||||
|
||||
# Use this property to enable or disable the Hermes JS engine.
|
||||
# If set to false, you will be using JSC instead.
|
||||
# Disabled for debug builds to avoid 'maximum call stack exceeded' errors.
|
||||
# https://github.com/status-im/status-mobile/issues/18493
|
||||
hermesEnabled=false
|
||||
# Flipper
|
||||
FLIPPER_VERSION=0.54.0
|
||||
|
||||
@@ -12,10 +12,11 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
|
||||
include ':react-native-nfc-manager'
|
||||
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
|
||||
include ':app'
|
||||
include ':react-native-dialogs'
|
||||
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
|
||||
include ':react-native-status'
|
||||
project(':react-native-status').projectDir = new File(rootProject.projectDir, '../modules/react-native-status/android')
|
||||
include ':react-native-status-keycard'
|
||||
project(':react-native-status-keycard').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-status-keycard/android')
|
||||
include ':react-native-blur'
|
||||
project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android')
|
||||
includeBuild('../node_modules/@react-native/gradle-plugin')
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
module.exports = {
|
||||
presets: ['module:@react-native/babel-preset'],
|
||||
plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
|
||||
};
|
||||
|
||||
"presets": [
|
||||
"module:metro-react-native-babel-preset"
|
||||
],
|
||||
"plugins": [
|
||||
"react-native-reanimated/plugin"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
"presets": [
|
||||
'@babel/preset-react',
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
targets: {
|
||||
node: '14',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.19' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
@@ -15,7 +14,7 @@ pipeline {
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '20',
|
||||
artifactNumToKeepStr: '1',
|
||||
artifactNumToKeepStr: '10',
|
||||
))
|
||||
/* Allows combined build to copy */
|
||||
copyArtifactPermission('/status-mobile/*')
|
||||
@@ -34,19 +33,23 @@ pipeline {
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* coverage report identification */
|
||||
COVERALLS_SERVICE_NAME = "jenkins"
|
||||
COVERALLS_SERVICE_JOB_ID = "${JOB_NAME}#${BUILD_NUMBER}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
@@ -71,9 +74,21 @@ pipeline {
|
||||
}
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
def urls = apks.collect { s5cmd.upload(it) }
|
||||
env.PKG_URL = urls.first()
|
||||
def urls = apks.collect { s3.uploadArtifact(it) }
|
||||
/* return only the universal APK */
|
||||
if (urls.size() > 1) {
|
||||
env.PKG_URL = urls.find { it.contains('universal') }
|
||||
} else { /* if no universal is available pick first */
|
||||
env.PKG_URL = urls.first()
|
||||
}
|
||||
jenkins.setBuildDesc(APK: env.PKG_URL)
|
||||
/* e2e builds get tested in SauceLabs */
|
||||
if (utils.isE2EBuild()) {
|
||||
env.SAUCE_URL = android.uploadToSauceLabs()
|
||||
}
|
||||
if (utils.isNightlyBuild()) {
|
||||
env.DIAWI_URL = android.uploadToDiawi()
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
@@ -15,12 +12,12 @@ pipeline {
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
artifactNumToKeepStr: '10',
|
||||
))
|
||||
}
|
||||
|
||||
/* WARNING: Defining parameters here with the ?: trick causes them to remember last value. */
|
||||
parameters {
|
||||
parameters {
|
||||
choice(
|
||||
name: 'BUILD_TYPE',
|
||||
description: 'Makefile target to build. Optional Parameter.',
|
||||
@@ -37,6 +34,8 @@ pipeline {
|
||||
stage('Prep') {
|
||||
steps { script {
|
||||
println("Current JOB: ${env.JOB_NAME}")
|
||||
/* just for a shorter access */
|
||||
btype = utils.getBuildType()
|
||||
} }
|
||||
}
|
||||
stage('Build') {
|
||||
@@ -47,6 +46,9 @@ pipeline {
|
||||
stage('Android') { steps { script {
|
||||
apk = jenkins.Build('status-mobile/platforms/android')
|
||||
} } }
|
||||
stage('Android e2e') { steps { script {
|
||||
apke2e = jenkins.Build('status-mobile/platforms/android-e2e')
|
||||
} } }
|
||||
stage('Tests') { steps { script {
|
||||
jenkins.Build('status-mobile/platforms/tests')
|
||||
} } }
|
||||
@@ -56,7 +58,9 @@ pipeline {
|
||||
steps { script {
|
||||
sh('rm -f pkg/*')
|
||||
jenkins.copyArts(ios)
|
||||
//jenkins.copyArts(iose2e)
|
||||
jenkins.copyArts(apk)
|
||||
jenkins.copyArts(apke2e)
|
||||
sha = "pkg/${utils.pkgFilename(ext: 'sha256')}"
|
||||
dir('pkg') {
|
||||
/* generate sha256 checksums for upload */
|
||||
@@ -70,11 +74,11 @@ pipeline {
|
||||
/* object for easier URLs handling */
|
||||
urls = [
|
||||
/* mobile */
|
||||
Apk: utils.pkgUrl(apk),
|
||||
iOS: utils.pkgUrl(ios),
|
||||
Apk: utils.pkgUrl(apk), Apke2e: utils.pkgUrl(apke2e),
|
||||
iOS: utils.pkgUrl(ios), /*iOSe2e: utils.pkgUrl(iose2e),*/
|
||||
Diawi: utils.getEnv(ios, 'DIAWI_URL'),
|
||||
/* upload the sha256 checksums file too */
|
||||
SHA: s5cmd.upload(sha),
|
||||
SHA: s3.uploadArtifact(sha),
|
||||
]
|
||||
/* add URLs to the build description */
|
||||
jenkins.setBuildDesc(urls)
|
||||
@@ -83,9 +87,11 @@ pipeline {
|
||||
stage('Publish') {
|
||||
when { expression { params.PUBLISH } }
|
||||
steps { script {
|
||||
switch (utils.getBuildType()) {
|
||||
case 'nightly': /* Create JSON file with newest build URLs */
|
||||
updateBucketJSON(urls, 'latest.json');
|
||||
switch (btype) {
|
||||
case 'nightly':
|
||||
/* Create JSON file with newest build URLs */
|
||||
s3.updateBucketJSON(urls, 'latest.json');
|
||||
build(job: 'website/status.im', wait: false);
|
||||
break;
|
||||
case 'release':
|
||||
github.publishReleaseFiles(repo: 'status-mobile');
|
||||
@@ -93,6 +99,17 @@ pipeline {
|
||||
}
|
||||
} }
|
||||
}
|
||||
stage('Run e2e') {
|
||||
when { expression { btype == 'nightly' && params.PUBLISH } }
|
||||
steps { script {
|
||||
e2eApk = utils.getEnv(apke2e, 'SAUCE_URL')
|
||||
build(
|
||||
job: 'status-mobile/e2e/status-app-nightly',
|
||||
parameters: [string(name: 'APK_NAME', value: e2eApk)],
|
||||
wait: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,22 +133,3 @@ def Boolean getPublishDefault(Boolean previousValue) {
|
||||
if (previousValue != null) { return previousValue }
|
||||
return false
|
||||
}
|
||||
|
||||
/* Helper for updating JSON with newest builds. */
|
||||
def updateBucketJSON(urls, fileName) {
|
||||
/* latest.json has slightly different key names */
|
||||
def content = [
|
||||
DIAWI: urls.Diawi,
|
||||
APK: urls.Apk, IOS: urls.iOS,
|
||||
APP: urls.App, MAC: urls.Mac,
|
||||
WIN: urls.Win, SHA: urls.SHA
|
||||
]
|
||||
def filePath = "${pwd()}/pkg/${fileName}"
|
||||
/* it might not exist */
|
||||
sh "mkdir -p ${pwd()}/pkg"
|
||||
def contentJson = new JsonBuilder(content).toPrettyString()
|
||||
println "${filePath}:\n${contentJson}"
|
||||
writeFile(file: filePath, text: contentJson)
|
||||
return s5cmd.upload(filePath)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
triggers {
|
||||
// Nightly at 0am
|
||||
cron 'H 0 * * *'
|
||||
}
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'BRANCH',
|
||||
description: 'Name of the branch to checkout and build.',
|
||||
defaultValue: 'develop',
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Build') {
|
||||
steps {
|
||||
script {
|
||||
apk_build = jenkins.Build('status-mobile/platforms/android-e2e')
|
||||
apk_build_number = apk_build.getNumber().toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Run e2e') {
|
||||
steps {
|
||||
build(
|
||||
job: 'status-mobile/e2e/status-app-nightly',
|
||||
parameters: [
|
||||
string(name: 'APK_BUILD_NUMBER', value: apk_build_number),
|
||||
string(name: 'BRANCH', value: env.BRANCH),
|
||||
]
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos && arm64 && nix-2.19 && xcode-15.1' }
|
||||
agent { label 'macos && arm64 && nix-2.11 && xcode-14.2' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
@@ -23,7 +22,7 @@ pipeline {
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '20',
|
||||
artifactNumToKeepStr: '1',
|
||||
artifactNumToKeepStr: '10',
|
||||
))
|
||||
/* Allows combined build to copy */
|
||||
copyArtifactPermission('/status-mobile/*')
|
||||
@@ -34,11 +33,13 @@ pipeline {
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = 'ios'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
/* See nix/README.md */
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
BUNDLE_PATH = "${HOME}/.bundle"
|
||||
}
|
||||
@@ -47,6 +48,7 @@ pipeline {
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
utils.symlinkEnv()
|
||||
println("Build Number: ${utils.genBuildNumber()}")
|
||||
}
|
||||
@@ -61,11 +63,6 @@ pipeline {
|
||||
steps {
|
||||
script { api = ios.bundle() }
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
archiveArtifacts 'logs/*'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Parallel Upload') {
|
||||
parallel {
|
||||
@@ -76,9 +73,14 @@ pipeline {
|
||||
}
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
env.DIAWI_URL = ios.uploadToDiawi()
|
||||
env.PKG_URL = env.DIAWI_URL
|
||||
env.PKG_URL = s3.uploadArtifact(api)
|
||||
jenkins.setBuildDesc(IPA: env.PKG_URL)
|
||||
/* e2e builds get tested in SauceLabs */
|
||||
if (utils.isE2EBuild()) {
|
||||
env.SAUCE_URL = ios.uploadToSauceLabs()
|
||||
} else if (!utils.isReleaseBuild()) {
|
||||
env.DIAWI_URL = ios.uploadToDiawi()
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'NIX_CACHE_HOST',
|
||||
description: 'FQDN of Nix binary cache host.',
|
||||
defaultValue: params.NIX_CACHE_HOST ?: 'cache-01.do-ams3.nix.ci.statusim.net'
|
||||
)
|
||||
string(
|
||||
name: 'NIX_CACHE_USER',
|
||||
description: 'Username for Nix binary cache host.',
|
||||
defaultValue: params.NIX_CACHE_USER ?: 'nix-cache'
|
||||
)
|
||||
}
|
||||
|
||||
environment {
|
||||
/* See nix/README.md */
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
/* we source .bash_profile to be able to use nix-store */
|
||||
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .profile;"
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 300, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
daysToKeepStr: '30',
|
||||
))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
|
||||
/* some build targets don't build on MacOS */
|
||||
uname = sh(script: 'uname', returnStdout: true)
|
||||
} }
|
||||
}
|
||||
stage('Build status-go') {
|
||||
steps { script {
|
||||
def platforms = ['mobile.android', 'mobile.ios']
|
||||
if (uname != "Darwin") {
|
||||
platforms.removeAll { it == "ios" }
|
||||
}
|
||||
platforms.each { os ->
|
||||
nix.build(
|
||||
attr: "targets.status-go.${os}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
}
|
||||
} }
|
||||
}
|
||||
stage('Build android jsbundle') {
|
||||
steps { script {
|
||||
/* build/fetch things required to produce a js-bundle for android
|
||||
* (e.g. maven and node repos) */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.android.jsbundle',
|
||||
sandbox: false,
|
||||
pure: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Build android deps') {
|
||||
steps { script {
|
||||
/* build/fetch things required to build jsbundle and android */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.android.release.buildInputs',
|
||||
sandbox: false,
|
||||
pure: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Build nix shell deps') {
|
||||
steps { script {
|
||||
/* build/fetch things required to instantiate shell.nix for TARGET=all */
|
||||
nix.build(
|
||||
attr: 'shells.default.buildInputs',
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
sshagent(credentials: ['nix-cache-ssh']) {
|
||||
nix.shell("""
|
||||
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
|
||||
-not -name '*.links' -and -not -name '*-status-mobile-*' \
|
||||
| xargs nix copy \
|
||||
--to ssh-ng://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
post {
|
||||
always { script {
|
||||
nix.shell('nix-store --optimize', pure: false)
|
||||
nix.shell('nix/scripts/clean.sh', pure: false)
|
||||
} }
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,20 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.19' }
|
||||
agent { label 'linux && x86_64 && nix-2.11' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 20, unit: 'MINUTES')
|
||||
timeout(time: 10, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '20',
|
||||
artifactNumToKeepStr: '1',
|
||||
artifactNumToKeepStr: '10',
|
||||
))
|
||||
/* Abort old PR builds. */
|
||||
disableConcurrentBuilds(
|
||||
@@ -29,53 +28,50 @@ pipeline {
|
||||
description: 'Specify build type. Values: pr / e2e / nightly / release',
|
||||
defaultValue: 'pr',
|
||||
)
|
||||
booleanParam(
|
||||
name: 'RUN_CONTRACT_TESTS',
|
||||
description: 'Whether to run optional and slow contract tests.',
|
||||
defaultValue: false,
|
||||
)
|
||||
}
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
PLATFORM = 'tests'
|
||||
LANG = "en_US.UTF-8"
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET = 'tests'
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
|
||||
CLJ_LINTER_PRINT_WARNINGS = 'true'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Test') {
|
||||
parallel {
|
||||
stage('Lint') {
|
||||
steps { make('lint') }
|
||||
}
|
||||
stage('Unit') {
|
||||
steps { make('test-unit') }
|
||||
}
|
||||
stage('Component') {
|
||||
steps { make('test-component') }
|
||||
stage('Prep') {
|
||||
steps {
|
||||
script {
|
||||
utils.doGitRebasePR()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Heavy Test') {
|
||||
stage('Checks') {
|
||||
parallel {
|
||||
stage('Contract') {
|
||||
when { expression { params.RUN_CONTRACT_TESTS } }
|
||||
steps { make('test-contract') }
|
||||
stage('Lint') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make lint 2>&1 | tee ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Integration') {
|
||||
steps { make('test-integration') }
|
||||
stage('Tests') {
|
||||
steps {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make test 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Upload') {
|
||||
steps {
|
||||
script {
|
||||
env.PKG_URL = s5cmd.upload(LOG_FILE)
|
||||
env.PKG_URL = s3.uploadArtifact(LOG_FILE)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,10 +82,3 @@ pipeline {
|
||||
always { sh 'make purge' }
|
||||
}
|
||||
}
|
||||
|
||||
def make(target) {
|
||||
sh """#!/bin/bash
|
||||
set -eo pipefail
|
||||
make ${target} 2>&1 | tee -a ${LOG_FILE}
|
||||
"""
|
||||
}
|
||||
|
||||
@@ -1,69 +1,32 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
pipeline {
|
||||
|
||||
agent { label 'linux' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'APK_BUILD_NUMBER',
|
||||
description: 'platform/e2e build number for apk artifact',
|
||||
name: 'APK_NAME',
|
||||
description: 'Filename of APK uploaded to SauceLabs.',
|
||||
)
|
||||
string(
|
||||
name: 'KEYWORD_EXPRESSION',
|
||||
description: 'This will run tests which contain names that match the given string expression (Optional)',
|
||||
defaultValue: '',
|
||||
)
|
||||
string(
|
||||
name: 'BRANCH',
|
||||
description: 'Name of the branch to checkout and build.',
|
||||
defaultValue: 'develop',
|
||||
)
|
||||
string(
|
||||
name: 'TR_CASE_IDS',
|
||||
description: 'IDs of the TestRail case, separated by a comma (Optional)',
|
||||
defaultValue: '',
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Fetch') {
|
||||
steps { script {
|
||||
copyArtifacts(
|
||||
projectName: "status-mobile/platforms/android-e2e",
|
||||
filter: 'result/*-x86_64.apk',
|
||||
selector: specific(env.APK_BUILD_NUMBER),
|
||||
)
|
||||
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*-x86_64.apk')}"
|
||||
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
steps {
|
||||
withCredentials([
|
||||
@@ -95,13 +58,13 @@ pipeline {
|
||||
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
|
||||
sh """
|
||||
python3 -m pytest \
|
||||
--numprocesses 8 \
|
||||
--numprocesses 4 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
-m testrail_id \
|
||||
-m \"nightly\" \
|
||||
-m \"new_ui_critical or new_ui_medium\" \
|
||||
-k \"${params.KEYWORD_EXPRESSION}\" \
|
||||
--apk=${params.APK_URL ?: apk_path}
|
||||
--apk=${params.APK_NAME}
|
||||
"""
|
||||
}
|
||||
}
|
||||
@@ -125,8 +88,5 @@ pipeline {
|
||||
)
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'make purge'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
pipeline {
|
||||
|
||||
@@ -11,14 +10,20 @@ pipeline {
|
||||
description: 'Name of the branch to checkout and build.',
|
||||
defaultValue: 'develop',
|
||||
)
|
||||
/* Commented to use TEST_MARKERS values from job params
|
||||
string(
|
||||
name: 'TEST_MARKERS',
|
||||
description: 'Marker expression for matching tests to run.',
|
||||
defaultValue: 'new_ui_critical',
|
||||
) */
|
||||
string(
|
||||
name: 'APK_NAME',
|
||||
description: 'Filename of APK uploaded to SauceLabs, path, or URL.',
|
||||
)
|
||||
string(
|
||||
name: 'PR_ID',
|
||||
description: 'ID of the Pull Request triggering this build.',
|
||||
)
|
||||
string(
|
||||
name: 'APK_URL',
|
||||
description: 'Optional, set if job require APK to be downloaded from URL.',
|
||||
)
|
||||
string(
|
||||
name: 'KEYWORD_EXPRESSION',
|
||||
description: 'This will run tests which contain names that match the given string expression (Optional)',
|
||||
@@ -29,68 +34,29 @@ pipeline {
|
||||
description: 'IDs of the TestRail case, separated by a comma (Optional)',
|
||||
defaultValue: '',
|
||||
)
|
||||
/* FIXME: Remove this no longer relevant argument */
|
||||
string(
|
||||
name: 'APK_NAME',
|
||||
description: 'OBSOLETE ARGUMENT TO BE REMOVED',
|
||||
defaultValue: 'DUMMY',
|
||||
)
|
||||
string(
|
||||
name: 'TEST_MARKERS',
|
||||
description: 'Marker expression for matching tests to run.',
|
||||
defaultValue: 'smoke',
|
||||
)
|
||||
}
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
timeout(time: 90, unit: 'MINUTES')
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
stage('Checks') {
|
||||
steps { script {
|
||||
currentBuild.displayName = "PR-${params.PR_ID}"
|
||||
if (params.PR_ID == null) {
|
||||
error("PR_ID parameter not set!")
|
||||
}
|
||||
if (params.APK_NAME == null) { error("APK_NAME parameter not set!") }
|
||||
if (params.PR_ID == null) { error("PR_ID parameter not set!") }
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Fetch') {
|
||||
when { expression { !params.APK_URL } }
|
||||
steps { script {
|
||||
copyArtifacts(
|
||||
projectName: "status-mobile/prs/android-e2e/PR-${params.PR_ID}",
|
||||
/* WARNING: This copies the latest available artifact. */
|
||||
selector: lastWithArtifacts(),
|
||||
)
|
||||
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*.apk')}"
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
steps { script {
|
||||
currentBuild.displayName = "PR-${params.PR_ID}"
|
||||
/* for managing optional arguments */
|
||||
def extraPytestOpts = ''
|
||||
if (params.TR_CASE_IDS != '') {
|
||||
@@ -133,11 +99,11 @@ pipeline {
|
||||
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
|
||||
sh """
|
||||
python3 -m pytest \
|
||||
--numprocesses 8 \
|
||||
--numprocesses 4 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
-k \"${params.KEYWORD_EXPRESSION}\" \
|
||||
--apk=${params.APK_URL ?: apk_path} \
|
||||
--apk=${params.APK_NAME} \
|
||||
--build=PR-${params.PR_ID}-${utils.timestamp()} \
|
||||
--pr_number=${params.PR_ID} \
|
||||
${extraPytestOpts}
|
||||
@@ -147,9 +113,4 @@ pipeline {
|
||||
} }
|
||||
}
|
||||
}
|
||||
post {
|
||||
cleanup {
|
||||
sh 'make purge'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
pipeline {
|
||||
|
||||
agent { label 'linux' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'APK_URL',
|
||||
description: 'URL of APK to be tested(base for upgrade, usually release build)',
|
||||
name: 'APK_NAME',
|
||||
description: 'Filename of APK uploaded to SauceLabs (base for upgrade, usually release build)',
|
||||
)
|
||||
string(
|
||||
name: 'APK_URL_UPGRADE',
|
||||
description: 'URL of APK of upgraded application (installed on top of base)',
|
||||
name: 'APK_NAME_UPGRADE',
|
||||
description: 'Filename of APK of upgraded application (installed on top of base)',
|
||||
)
|
||||
string(
|
||||
name: 'KEYWORD_EXPRESSION',
|
||||
@@ -28,40 +25,17 @@ pipeline {
|
||||
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '10',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
))
|
||||
}
|
||||
|
||||
environment {
|
||||
/* Avoid race conditions with other builds using virtualenv. */
|
||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Prep') {
|
||||
steps { script {
|
||||
if (params.APK_URL == null) {
|
||||
error("APK_URL parameter not set!")
|
||||
}
|
||||
if (params.APK_URL_UPGRADE == null) {
|
||||
error("APK_URL_UPGRADE parameter not set!")
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
dir('test/appium') {
|
||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
||||
sh 'pip3 install -r requirements.txt'
|
||||
sh 'pip3 install --user -r requirements.txt'
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
steps { script {
|
||||
/* for managing optional arguments */
|
||||
@@ -103,8 +77,8 @@ pipeline {
|
||||
--numprocesses 4 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
--apk=${params.APK_URL} \
|
||||
--apk_upgrade=${params.APK_URL_UPGRADE} \
|
||||
--apk=${params.APK_NAME} \
|
||||
--apk_upgrade=${params.APK_NAME_UPGRADE} \
|
||||
${extraPytestOpts}
|
||||
"""
|
||||
}
|
||||
@@ -129,8 +103,5 @@ pipeline {
|
||||
)
|
||||
}
|
||||
}
|
||||
cleanup {
|
||||
sh 'make purge'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
TARGET = 'ios'
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* See nix/README.md */
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
/* avoid writing to r/o /nix */
|
||||
GEM_HOME = '~/.rubygems'
|
||||
}
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
name: 'NIX_CACHE_HOST',
|
||||
description: 'FQDN of Nix binary cache host.',
|
||||
defaultValue: params.NIX_CACHE_HOST ?: 'cache-01.do-ams3.nix.ci.statusim.net'
|
||||
)
|
||||
string(
|
||||
name: 'NIX_CACHE_USER',
|
||||
description: 'Username for Nix binary cache host.',
|
||||
defaultValue: params.NIX_CACHE_USER ?: 'nix-cache'
|
||||
)
|
||||
}
|
||||
|
||||
environment {
|
||||
/* we source .bash_profile to be able to use nix-store */
|
||||
NIX_SSHOPTS = "-oStrictHostKeyChecking=no"
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
NIX_STORE_CMD = '/nix/var/nix/profiles/default/bin/nix-store'
|
||||
NIX_SSH_REMOTE = "ssh://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}?remote-program=${env.NIX_STORE_CMD}"
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
disableConcurrentBuilds()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
/* Limit builds retained */
|
||||
buildDiscarder(logRotator(
|
||||
numToKeepStr: '20',
|
||||
daysToKeepStr: '30',
|
||||
artifactNumToKeepStr: '1',
|
||||
))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Setup') {
|
||||
steps { script {
|
||||
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
|
||||
/* some build targets don't build on MacOS */
|
||||
os = sh(script: 'uname', returnStdout: true).trim()
|
||||
arch = sh(script: 'arch', returnStdout: true).trim()
|
||||
} }
|
||||
}
|
||||
stage('Build status-go') {
|
||||
steps { script {
|
||||
def platforms = ['mobile.android', 'mobile.ios', 'library']
|
||||
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
|
||||
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
|
||||
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
|
||||
platforms.each { platform ->
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, platform)
|
||||
nix.build(
|
||||
attr: "targets.status-go.${platform}",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
}
|
||||
} }
|
||||
}
|
||||
stage('Build android jsbundle') {
|
||||
steps { script {
|
||||
/* Build/fetch deps required for jsbundle build. */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.jsbundle',
|
||||
sandbox: false,
|
||||
pure: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Build android deps') {
|
||||
steps { script {
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, 'android')
|
||||
/* Build/fetch deps required to build android release. */
|
||||
nix.build(
|
||||
attr: 'targets.mobile.android.build.buildInputs',
|
||||
sandbox: false,
|
||||
pure: false,
|
||||
link: false
|
||||
)
|
||||
} }
|
||||
}
|
||||
stage('Build nix shell deps') {
|
||||
steps { script {
|
||||
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
|
||||
if (os != 'Darwin') { shells.removeAll { it == 'ios' } }
|
||||
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
|
||||
if (arch == 'arm64') { shells.removeAll { it == 'android' } }
|
||||
/* Build/fetch deps required to start default Nix shell. */
|
||||
shells.each { shell ->
|
||||
/* Allow for Android builds on Apple ARM. */
|
||||
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, shell)
|
||||
nix.build(
|
||||
attr: "shells.${shell}.buildInputs",
|
||||
sandbox: false,
|
||||
link: false
|
||||
)
|
||||
}
|
||||
} }
|
||||
}
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
sshagent(credentials: ['nix-cache-ssh']) {
|
||||
nix.shell("""
|
||||
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
|
||||
-not -name '*.links' -and -not -name '*-status-mobile-*' \
|
||||
| xargs nix copy --to ${NIX_SSH_REMOTE}
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
}
|
||||
} }
|
||||
}
|
||||
}
|
||||
post {
|
||||
always { script {
|
||||
nix.shell('nix-store --optimize', pure: false)
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
def nixSysOverride(os, arch, target='android') {
|
||||
return (
|
||||
os == 'Darwin' &&
|
||||
arch == 'arm64' &&
|
||||
target =~ /.*android$/
|
||||
) ? 'x86_64-darwin' : ''
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
library 'status-jenkins-lib@v1.6.3'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
environment {
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
PLATFORM = 'ios'
|
||||
LANG = 'en_US.UTF-8'
|
||||
LANGUAGE = 'en_US.UTF-8'
|
||||
LC_ALL = 'en_US.UTF-8'
|
||||
TARGET = 'ios'
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
/* See nix/README.md */
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
/* avoid writing to r/o /nix */
|
||||
GEM_HOME = '~/.rubygems'
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env groovy
|
||||
/**
|
||||
* This job runs daily and executes `pod repo update` on MacOS
|
||||
* This is done to avoid issues with out of date repo causing errors like:
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.4'
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label 'linux'
|
||||
}
|
||||
|
||||
triggers {
|
||||
cron('H 5 * * *')
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
/* Prevent Jenkins jobs from running forever */
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
/* Disable concurrent jobs */
|
||||
disableConcurrentBuilds()
|
||||
/* Don't keep more than 50 builds */
|
||||
buildDiscarder(logRotator(numToKeepStr: '10'))
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Get Nodes') {
|
||||
steps { script {
|
||||
stagePerNode = nodesByLabel('macos').collectEntries {
|
||||
["${it}" : generateNodeCleanupStage(it)]
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
stage('Clean Xcode') {
|
||||
steps { script {
|
||||
parallel stagePerNode
|
||||
} }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def generateNodeCleanupStage(nodeLabel) {
|
||||
return { stage(nodeLabel) {
|
||||
node(nodeLabel) {
|
||||
dir('/Users/jenkins/Library/Developer/Xcode') {
|
||||
sh 'rm -fr Archives DerivedData'
|
||||
}
|
||||
}
|
||||
} }
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
## "@react-native-community/netinfo": "^3.2.1"
|
||||
|
||||
no known issue while updating version
|
||||
|
||||
used to monitor network information (connected, expensive, connection type)
|
||||
|
||||
## "bignumber.js": "git+https://github.com/status-im/bignumber.js.git#v4.0.2-status"
|
||||
|
||||
used to work with big numbers in JS
|
||||
BN.js (used in web3-utils) doesn't support decimals, though we could work without decimals
|
||||
|
||||
should be replaced by JSBI https://github.com/GoogleChromeLabs/jsbi/blob/master/README.md
|
||||
see web-utils issue: https://github.com/ethereum/web3.js/issues/2171
|
||||
|
||||
## "buffer": "^5.4.2"
|
||||
|
||||
required by bignumber.js otherwise there is a compilation error
|
||||
|
||||
## "chance": "^1.1.0"
|
||||
|
||||
used to generate guids and random values in `status-im.utils.random`
|
||||
|
||||
## "create-react-class": "15.6.2"
|
||||
|
||||
fixed version because even bugfix update causes compilation error with current version of react-native (0.59)
|
||||
|
||||
internal react library, used by figwheel for instance but also probably react
|
||||
|
||||
## "emojilib": "^2.4.0"
|
||||
|
||||
used for emojis
|
||||
|
||||
## "eth-phishing-detect": "^1.1.13"
|
||||
|
||||
used to check if URL is known for phishing
|
||||
|
||||
## "hi-base32": "^0.5.0"
|
||||
|
||||
used only in `status-im.browser.core` to convert base58 hash into base32 hash
|
||||
TODO: could be replaced by a simple implementation of ascii to base32
|
||||
|
||||
## "i18n-js": "^3.3.0"
|
||||
|
||||
used to manage translations
|
||||
|
||||
## "identicon.js": "git+https://github.com/status-im/identicon.js.git#v1.2.1-status"
|
||||
|
||||
TODO: switch to latest upstream version, fork is seriously outdated and changes have been merged to master long time ago
|
||||
used to generate identicons
|
||||
|
||||
## "qrcode": "^1.4.1"
|
||||
|
||||
used to generate QR code
|
||||
|
||||
## "react": "16.8.3"
|
||||
|
||||
react library, update based on react-native recommendation
|
||||
|
||||
## "react-dom": "16.4.2"
|
||||
|
||||
react library, update based on react-native recommendation
|
||||
|
||||
## "react-native": "git+https://github.com/status-im/react-native.git#v0.59.10"
|
||||
|
||||
react-native
|
||||
|
||||
TODO: forked because of specific markdown handling, should be bountied to be turned into a library so we can go back to upstream version
|
||||
|
||||
## "react-native-background-timer": "^2.1.1"
|
||||
|
||||
used to have setTimeout and setInterval that don't trigger yellow warning about long timeouts
|
||||
|
||||
## "react-native-camera": "git+https://github.com/status-im/react-native-camera.git#v1.1.5-1-status"
|
||||
|
||||
used to read QR code and take profile picture
|
||||
TODO: update version, this one doesn't work with Android (done in react-native upgrade branch)
|
||||
|
||||
## "react-native-config": "git+https://github.com/status-im/react-native-config.git#0.11.2-1"
|
||||
|
||||
used to fetch config values from env
|
||||
TODO: not sure fork usage is justified
|
||||
|
||||
## "react-native-dialogs": "^1.0.5"
|
||||
|
||||
used to show dialogs but only in android in list selection `status-im.ui.components.list-selection`, iOS uses action-sheet
|
||||
TODO: see if we should actually remove it
|
||||
|
||||
## "react-native-fetch-polyfill": "^1.1.3"
|
||||
|
||||
used to be able to put a timeout on fetch request
|
||||
TODO: check if the fetch timeout is actually aborting the request or only ignoring the callback on the response, if it
|
||||
doesn't then this is useless and we are better of using a simple seTimeout
|
||||
|
||||
## "react-native-fs": "^2.14.1"
|
||||
|
||||
used for some filesystem related functions, for instance to get no-backup directory in `status-im.utils.platform`
|
||||
|
||||
## "react-native-gesture-handler": "1.3.0"
|
||||
|
||||
library used by react-navigation
|
||||
use version recommended by react-navigation
|
||||
|
||||
## "react-native-image-crop-picker": "^0.18.2"
|
||||
|
||||
used for profile picture
|
||||
|
||||
## "react-native-image-resizer": "git+https://github.com/status-im/react-native-image-resizer.git#1.0.##-status"
|
||||
|
||||
used for profile picture
|
||||
|
||||
## "react-native-keychain": "git+https://github.com/status-im/react-native-keychain.git#v.3.0.0-status"
|
||||
|
||||
used for storing password when user saves password
|
||||
TODO: check if fork is necessary, merge with upstream?
|
||||
|
||||
## "react-native-languages": "^3.0.2"
|
||||
|
||||
TODO DEPRECATED, should be replaced with https://github.com/react-native-community/react-native-localize
|
||||
used to get user language and interact with i18n.js
|
||||
|
||||
## "react-native-mail": "git+https://github.com/status-im/react-native-mail.git#v3.0.8_status"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
|
||||
## "react-native-screens": "1.0.0-alpha.22"
|
||||
|
||||
used by react-navigation
|
||||
|
||||
TODO: update once bug is fixed for Android that causes crash when app is back from background after being put in background with hardware backbutton press
|
||||
|
||||
## "react-native-shake": "^3.3.1"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
## "react-native-lottie-splash-screen": "^1.0.1"
|
||||
|
||||
used to make splash screen with lottie animation during initial loading for android, also used as replacement of "react-native-splash-screen" for iOS
|
||||
|
||||
## "react-native-status-keycard": "^2.5.7"
|
||||
|
||||
used for keycard
|
||||
|
||||
## "react-native-svg": "9.7.1"
|
||||
|
||||
used for svg icons, mostly collectibles are using svg
|
||||
TODO: updating requires a pod update on iOS
|
||||
|
||||
## "react-native-touch-id": "^4.4.1"
|
||||
|
||||
used for touch-id identification
|
||||
|
||||
## "react-native-webview": "git+https://github.com/status-im/react-native-webview.git#v8.0.7_3"
|
||||
|
||||
used for browser
|
||||
|
||||
## "react-navigation": "3.11.0"
|
||||
|
||||
used for native navigation
|
||||
fixed because even bugfix version upgrade causes runtime errors with current version of react-native
|
||||
|
||||
## "rn-emoji-keyboard": "https://github.com/status-im/rn-emoji-keyboard"
|
||||
|
||||
Used for taking emoji input, for custom emoji thumbnails for community channels
|
||||
|
||||
## "react-native-draggable-flatlist": "https://github.com/computerjazz/react-native-draggable-flatlist"
|
||||
|
||||
A drag-and-drop-enabled FlatList component for React Native
|
||||
@@ -0,0 +1,15 @@
|
||||
# new icons
|
||||
|
||||
## Export icons
|
||||
|
||||

|
||||
|
||||
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons`
|
||||
2. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name@2x.png"` should be renamed to `"icon_name@2x.png"`.
|
||||
3. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
|
||||
```clojure
|
||||
;; icon_name.png
|
||||
[vector-icons/icon :icon-name {:color ...}]
|
||||
```
|
||||
2x@2x
|
||||
4. If you want paltform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
|
||||
@@ -0,0 +1,202 @@
|
||||
# Setup your Editor/IDE
|
||||
|
||||
You can use any Clojure enabled editor. Here are instructions for developing the status-mobile app using:
|
||||
|
||||
* IntelliJ IDEA and Cursive
|
||||
* VS Code and Calva
|
||||
* Emacs/Cider
|
||||
|
||||
(Please add instructions for your favorite editor.)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Using Cursive](#using-cursive)
|
||||
- [Install Cursive](#install-cursive)
|
||||
- [Getting Cursive to understand `status-mobile`](#getting-cursive-to-understand-status-mobile)
|
||||
- [I get a lot of `cannot be resolved`](#i-get-a-lot-of-cannot-be-resolved)
|
||||
- [REPL!](#repl)
|
||||
- [Connecting to REPL to IntelliJ](#connecting-to-repl-to-intellij)
|
||||
- [Connecting REPL and IntelliJ to `status-mobile`](#connecting-repl-and-intellij-to-status-mobile)
|
||||
- [Using Calva](#using-calva)
|
||||
- [Start and connect the REPL](#start-and-connect-the-repl)
|
||||
- [Use the REPL](#use-the-repl)
|
||||
|
||||
## Using Cursive
|
||||
|
||||
### Install Cursive
|
||||
|
||||
See https://cursive-ide.com/userguide/index.html
|
||||
|
||||
### Getting Cursive to understand `status-mobile`
|
||||
|
||||
- Add this file to the root of the `status-mobile` project dir
|
||||
- https://gist.github.com/Samyoul/f71a0593ba7a12d24dd0d5ef986ebbec
|
||||
- Right click and "add as leiningen project"
|
||||
|
||||
<img src="images/IDE_SETUP/1_fake_project_file.png" width=75% />
|
||||
|
||||
## I get a lot of `cannot be resolved`
|
||||
|
||||
Are you getting problems where you get a lot of `cannot be resolved` on everything?
|
||||
|
||||
<img src="images/IDE_SETUP/2_resolve.jpeg" width=75% />
|
||||
|
||||
See https://cursive-ide.com/userguide/macros.html
|
||||
|
||||
- opt+enter (on macOS)
|
||||
- resolve defview as fn and letsubs as let
|
||||
- move selection on resolve and hit enter
|
||||
- and select defn for defview and let for letsubs
|
||||
|
||||
### REPL!
|
||||
|
||||
#### Connecting to REPL to IntelliJ
|
||||
|
||||
I had a number of problems connecting to REPL, the solution is as follows:
|
||||
|
||||
At the top of IntelliJ IDEA click on the `Add Configuration...` option:
|
||||
|
||||
<img src="images/IDE_SETUP/3_REPL_1.png" width=75% />
|
||||
|
||||
This will load the following menu:
|
||||
|
||||
<img src="images/IDE_SETUP/4_REPL_2.png" width=75% />
|
||||
|
||||
Click on the `+` icon in the top left corner of the menu.
|
||||
|
||||
Select `Clojure REPL > Remote`
|
||||
|
||||
<img src="images/IDE_SETUP/5_REPL_3.png" width=75% />
|
||||
|
||||
Which will load the following menu
|
||||
|
||||
<img src="images/IDE_SETUP/6_REPL_4.png" width=75% />
|
||||
|
||||
Enter the below options:
|
||||
|
||||
- Name = status-mobile
|
||||
- Display Name = status-mobile
|
||||
- Connection type = nREPL
|
||||
- Connection details
|
||||
- Host = 127.0.0.1
|
||||
- Port = 7888
|
||||
|
||||
<img src="images/IDE_SETUP/7_REPL_5.png" width=75% />
|
||||
|
||||
Press `OK`
|
||||
|
||||
Now the below option will be visible.
|
||||
Press the green run button
|
||||
|
||||
<img src="images/IDE_SETUP/8_REPL_6.png" width=75% />
|
||||
|
||||
You should now see an dialog with the following message:
|
||||
|
||||
```shell
|
||||
Connecting to remote nREPL server...
|
||||
Clojure 1.10.1
|
||||
```
|
||||
|
||||
To confirm you have a working connection with REPL enter the following command in the input box below the output:
|
||||
|
||||
```shell
|
||||
(prn 1)
|
||||
```
|
||||
|
||||
Which should output
|
||||
|
||||
```shell
|
||||
(prn 1)
|
||||
1
|
||||
=> nil
|
||||
```
|
||||
|
||||
See below:
|
||||
|
||||
<img src="images/IDE_SETUP/9_REPL_7.png" width=75% />
|
||||
|
||||
#### Connecting REPL and IntelliJ to `status-mobile`
|
||||
|
||||
**The important next step is telling REPL the context in which to interact with the code.**
|
||||
|
||||
Do the following:
|
||||
|
||||
Ensure you have 3 terminals running the following
|
||||
|
||||
- `make run-clojure`
|
||||
- `make run-metro`
|
||||
- `make run-ios` / `make run-android`
|
||||
|
||||
[See the STARTING GUIDE for details](STARTING_GUIDE.md#development)
|
||||
|
||||
Next go back to the REPL input and enter the following commands:
|
||||
|
||||
```clojure
|
||||
(shadow/watch :mobile)
|
||||
(shadow/repl :mobile)
|
||||
```
|
||||
|
||||
See Below
|
||||
|
||||
<img src="images/IDE_SETUP/10_REPL_8.png" width="75%" />
|
||||
|
||||
Which should switch the clj file type target to cljs as shown above
|
||||
|
||||
Finally you are ready to test REPL.
|
||||
|
||||
Create a sample function to evaluate something simple like `(prn "I'm working")`, move your cursor to one of the outer parentheses. Right or `control` click and select the `REPL` option. From there select `Sync files in REPL` and then `Send '...' to REPL'`.
|
||||
|
||||
<img src="images/IDE_SETUP/11_REPL_9.png" width="75%" />
|
||||
|
||||
Alternatively you can use the shortcut commands `⇧⌘M` to sync your files and `⇧⌘P` to send the statement to REPL. You may also need to switch the REPL namespace to match the current file, which can be done manually from the dialogue box or using the `⇧⌘N` shortcut key.
|
||||
|
||||
Following the above should give you the below result:
|
||||
|
||||
<img src="images/IDE_SETUP/12_REPL_10.png" width="75%" />
|
||||
|
||||
🎉 Tada! Working! 🎉
|
||||
|
||||
---
|
||||
|
||||
For additional details on issues you may face when setting up REPL with Cursive [see this document](https://notes.status.im/9Gr7kqF8SzC_SmYK0eB7uQ?view#Connecting-Cursive--IntelliJ-IDEA-to-REPL-Problems)
|
||||
|
||||
## Using Calva
|
||||
|
||||
For VS Code users.
|
||||
|
||||
0. Install Calva.
|
||||
|
||||
### Start and connect the REPL
|
||||
|
||||
1. Open the `status-mobile` folder.
|
||||
1. Start [Status development](STARTING_GUIDE.md#development) (Starting the `run-clojure` and `run-metro` jobs in split view in the VS Code integrated terminal works great.)
|
||||
1. Run the VS Code command: **Calva: Connect to a running REPL Server in the project**
|
||||
1. Select the project type `shadow-cljs`
|
||||
1. Accept the suggested connection `host:port`
|
||||
1. Select to connect to the `:mobile` build
|
||||
|
||||
### Use the REPL
|
||||
|
||||
Open any `.cljs` file in the project and evaluate forms in it. See https://calva.io/try-first/ for some starter tips and links. Confirm that your REPL is connected to the app by evaluating:
|
||||
|
||||
```clojure
|
||||
(js/alert "Hello from Status App!")
|
||||
```
|
||||
|
||||
🎉 Tada! You are ready to use the REPL to improve Status.im! 🎉
|
||||
|
||||
Please consider bookmarking [calva.io](https://calva.io/) for quick access to the Calva documentation.
|
||||
|
||||
## Using Emacs/Cider
|
||||
|
||||
1. Install Emacs/Cider/etc. (there is a lot of variability in how to manage things in emacs, so please google for help with this)
|
||||
2. Add a local ~/.shadow-cljs/config.edn file like below (corresponding to the version numbers of the packages you are using):
|
||||
|
||||
```clojure
|
||||
{:dependencies
|
||||
[[nrepl/nrepl "0.9.0"]
|
||||
[cider/cider-nrepl "0.28.4"]
|
||||
[cider/piggieback "0.5.2"]]}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
## Getting Started
|
||||
|
||||
- [Starting Guide](starting-guide.md)
|
||||
- [IDE Setup](ide-setup.md)
|
||||
|
||||
## Development Process
|
||||
|
||||
- [Coding guidelines](new-guidelines.md)
|
||||
- [UI components coding guidelines](ui-guidelines.md)
|
||||
- [Release Checklist](release-checklist.md)
|
||||
- [Release Guide](release-guide.md)
|
||||
- [Merging PR process](merging-pr-process.md)
|
||||
- [PR Review Policy](pr-review-policy.md)
|
||||
- [Working on PR together with QA team](pipeline_process.md)
|
||||
- [Debugging](debugging.md)
|
||||
- [Patching](patching.md)
|
||||
- [Creating a pixel perfect UI](pixel-perfection.md)
|
||||
- [Contributing to status-go](status-go-changes.md)
|
||||
- [Malli schemas (recorded demo)](https://www.youtube.com/watch?v=SlRio70aYVI) ([slides](files/forging-code-with-schemas-sep-2023-slides.pdf))
|
||||
|
||||
## Testing
|
||||
|
||||
- [Overview](tests/tests-overview.md)
|
||||
- [How to run local tests](tests/how-to-run-local-tests.md)
|
||||
- [End-to-end tests (e2e) overview](tests/how-to-launch-e2e.md)
|
||||
- [Component tests (jest) overview](tests/component-tests-overview.md)
|
||||
|
||||
## Project details
|
||||
|
||||
- [status-go introduction (recorded meeting)](https://drive.google.com/file/d/1B7TljmTZ8fHkqJH8ChU1Cp4FGDFM03gq/view)
|
||||
- [re-frame usage (recorded meeting)](https://drive.google.com/file/d/1qv_E0CEGzQpu_zGXD0gCTU5EvhC2k8Jy/view)
|
||||
- [status app functionality demo](https://drive.google.com/file/u/0/d/1PmwsMLTLDNNIdv5_6wvMOwoj2PfT50c6/view)
|
||||
|
||||
## Misc
|
||||
|
||||
- [Importing icons from Figma into project](export-icons.md)
|
||||
- [Updating Status APK builds for the F-Droid Android application catalogue](fdroid.md)
|
||||
- [Troubleshooting for known errors](troubleshooting.md)
|
||||
|
||||
## Outdated:
|
||||
|
||||
- [Old guidelines](codebase-structure-and-guidelines.md)
|
||||
- [Post mortem analysis](post-mortem.md)
|
||||
@@ -0,0 +1,115 @@
|
||||
# Description
|
||||
|
||||
This document explains some of the steps that are involved in releases.
|
||||
|
||||
# Release process
|
||||
|
||||
## Coordination
|
||||
|
||||
All the coordination is done in the `#release` channel on discord.
|
||||
|
||||
Release readiness can be tracked by watching an appropriate milestone at [milestones](https://github.com/status-im/status-mobile/milestones) section in github.
|
||||
|
||||
When release is building you can check the progress in a testrail. Ask @churik for access if you don't have it
|
||||
|
||||
## Preparing branches
|
||||
Special branches should be created at the start of a release process. That can be done manually or with the script
|
||||
|
||||
### Prepare branches with the script
|
||||
|
||||
You can use the script to cut a release branch. No arguments needed, the new release version will be deducted automatically:
|
||||
|
||||
`scripts/cut-release.sh`
|
||||
|
||||
Upon script call two branches will be created:
|
||||
- `release/a.b.x`
|
||||
- `chore/update-release-to-$version`
|
||||
|
||||
The first one is the main release branch. All bugfixes should be cherry-picked from `develop` to it. Jenkins treats that branch specially and prepares release builds from it.
|
||||
|
||||
The second branch only updates the `VERSION` file and all you need to do is to merge it to `develop`. If you have the `gh` command installed, `cut-release` script will automatically create a PR for this.
|
||||
|
||||
### Prepare branches manually
|
||||
|
||||
#### Create a branch
|
||||
|
||||
First, we need to create a release branch cut from develop.
|
||||
The name of the branch should be `release/a.b.x` where `x` is actually `x`, not a variable, and `a` and `b` are the `MAJOR` and `MINOR` version of the app.
|
||||
|
||||
For example, valid branch names are:
|
||||
|
||||
`release/1.12.x` or `release/3.12.x`
|
||||
|
||||
#### Update version
|
||||
|
||||
We need to update the `VERSION` file to reflect the release we want to build.
|
||||
|
||||
|
||||
## Building
|
||||
|
||||
Jenkins will automatically build this branch and create release candidates.
|
||||
Those will go through the QA process and the QA team will let us know when
|
||||
tested successfully.
|
||||
|
||||
## Bugfixes before an app is released
|
||||
|
||||
Because both `status-mobile` and `status-go` might have newer commits that we don't want to include, bug fixes should be applied separately to develop and the release branch.
|
||||
The best workflow is to send a PR to develop, get it merged, and the cherry-pick on the
|
||||
release branch.
|
||||
|
||||
It is a release manager's responsibility to cherry-pick bugfix from `develop` to release branch. In order to do this, you should be a part of a `release group` on github. Contact @jakubgs to be added.
|
||||
|
||||
If cherry-picking not practical for some reason (i.e develop has diverged significantly from release)
|
||||
other workflows are possible.
|
||||
|
||||
To change status-go, a similar workflow applies.
|
||||
First checkout the tag used in `status-go-version.json` of release branch.
|
||||
|
||||
`git checkout v0.62.3`
|
||||
|
||||
Create a branch on status-go named: `release/vx.y.z+hotfix.w` where (make sure branch name is not the same as the tag)
|
||||
|
||||
`x` is the `MAJOR` version
|
||||
`y` is the `MINOR` version
|
||||
`z` is the `PATCH` version
|
||||
`w` is the `HOTFIX` version
|
||||
|
||||
For example valid names are:
|
||||
|
||||
`release/v0.62.3+hotfix.2`
|
||||
`release/v1.3.4+hotfix.4`
|
||||
|
||||
Once the branch is ready to use and tested successfully, tag the branch:
|
||||
|
||||
`git tag v0.62.3+hotfix.2`
|
||||
|
||||
Push the branch and then the tag to origin:
|
||||
`git push --set-upstream origin release/v0.62.3+hotfix.2`
|
||||
`git push origin v0.62.3+hotfix.2`
|
||||
|
||||
Switch to status-mobile release branch, and cherry pick the commit you need.
|
||||
|
||||
Once that's done, update the status-mobile release branch with the new tag:
|
||||
|
||||
`make shell`
|
||||
|
||||
`scripts/update-status-go.sh v0.62.3+hotfix.2`
|
||||
|
||||
And commit and push the changes
|
||||
|
||||
# Hotfix process
|
||||
|
||||
The hotfix process is basically identical to the workflow of a bugfix:
|
||||
|
||||
1) Add the changes on status-mobile
|
||||
2) Make sure you use a hotfix branch for status-go (unless we are happy to release from develop)
|
||||
3) Update the `VERSION` in status-mobile
|
||||
|
||||
# PlayStore Metadata Updates
|
||||
This section is relevant only for the marketing team, no developer participation is required.
|
||||
|
||||
You can update Play Store release metadata using `fastlane android upload_metadata`.
|
||||
|
||||
But that requires credentials necessary for accessing Play Store API. The simpler way is to edit files contained within [`fastlane/metadata`](metadata) and run the following CI job:
|
||||
|
||||
https://ci.status.im/job/status-mobile/job/tools/job/update-playstore-metadata/
|
||||
@@ -0,0 +1,42 @@
|
||||
This document MUST be updated everytime a PR has been identified has the source of a bug in develop. The post mortem analysis MUST include: the CAUSE of the bug, the RESOLUTION PROCESS and PREVENTION MEASURES.
|
||||
|
||||
|
||||
# "sql: no rows in result set" error on iOS login
|
||||
|
||||
## Cause
|
||||
|
||||
There were errors in the iOS native code:
|
||||
- "loginWithKeycard" method was not implemented
|
||||
- "createAndLoginWithKeycard" method was actually used instead of "createAndLogin** which is used for regular account creation without keycard and doesn't have the same final argument
|
||||
|
||||
QA process was focused on account creation and login with keycard, and this bug would only appear specifically on iOS when creating an account without keycard and only during the next login. It was therefore a more complex path to reach than what could have been expected from this PR, and it was caused in develop by a developer working on iOS simulator because that is a common path during development.
|
||||
|
||||
## Resolution process
|
||||
|
||||
- the commit was reverted locally by the developer which fixed the issue localy and confirmed the faulty commit
|
||||
- the bug was only reproducible on iOS which strongly hinted at a potential issue with native code
|
||||
- the missing method was not the origin of the problem but was found at this point and further analysis lead to the shadowing error
|
||||
|
||||
## Prevention measures
|
||||
|
||||
- PRs that change native code should be checked for platform parity:
|
||||
- same methods are created/modified for each platform
|
||||
- test cases in the PR should take these methods in consideration
|
||||
|
||||
# Missing labels for en translation
|
||||
|
||||
https://github.com/status-im/status-mobile/issues/9003
|
||||
|
||||
## Cause
|
||||
|
||||
Unused labels in the application have been listed by QA and an issue created for their removal. The PR was made by an external contributor and it had to be rebased many time because it touched many files and other PRs got merged before this one could be tested. After a last rebase the PR was merged with 100% e2e test but no manual testing.
|
||||
|
||||
The reason some translations got deleted despite the fact that they were used is because the `message status` related labels were not explicitly mentioned in the code unlike every other labels. They were built from the actual `message status` and the prefix `status-`.
|
||||
|
||||
## Resolution process
|
||||
|
||||
The mistake was quickly noticed in develop and an issue created. The fix was to recover the 3 labels that were accidentally deleted.
|
||||
|
||||
## Prevention measures
|
||||
|
||||
The code has been changed so that the labels are no longer generated and appear in the code like other labels.
|
||||
@@ -0,0 +1,98 @@
|
||||
# Description
|
||||
|
||||
This document provides information on how to start developing Status App.
|
||||
|
||||
# Getting Started
|
||||
|
||||
To start developing start a shell for platform you are interested in.
|
||||
```
|
||||
make shell TARGET=android
|
||||
```
|
||||
This step will take a while the first time as it will download all dependencies.
|
||||
|
||||
# Development
|
||||
|
||||
There are three steps necessary to start development, in this case for Android:
|
||||
|
||||
1. `make run-clojure` - Compiles Clojure into JavaScript, watches for changes on cljs files, and hot-reloads code in the app.
|
||||
2. `make run-metro` - Starts metro bundler and watches JavaScript code.
|
||||
3. `make run-android` or `make run-ios` - Builds the Android/iOS app and starts it on the device.
|
||||
|
||||
The first two will continue watching for changes and keep re-building the app. They need to be ready first.
|
||||
The last one will exit once the app is up and ready.
|
||||
|
||||
## Simulators and Devices
|
||||
### Android
|
||||
|
||||
You need to have an emulator like [AVD](https://developer.android.com/studio/run/emulator), or [Genymotion](#genymotion-virtualization), or a real device running and visible to [adb](https://developer.android.com/studio/command-line/adb), before you run `make run-android`.
|
||||
|
||||
### iOS
|
||||
|
||||
You can specify the simulator type by adding the `SIMULATOR` flag:
|
||||
```sh
|
||||
make run-ios SIMULATOR="iPhone 11 Pro"
|
||||
```
|
||||
Some manual steps are necesary for [developing on a physical iOS Device](#physical-ios-device).
|
||||
|
||||
# Build release
|
||||
|
||||
To build the app, your can simply run on of the following:
|
||||
```
|
||||
make release-android
|
||||
make release-ios
|
||||
```
|
||||
|
||||
For more `make` targets run `make help`.
|
||||
|
||||
# Updating Dependencies
|
||||
|
||||
* `make nix-update-pods` - iOS CocoaPods dependencies (updates `ios/Podfile` and `ios/Podfile.loc`)
|
||||
* `make nix-update-gradle` - Android Gradle/Maven dependencies (updates `nix/deps/gradle/deps.json`)
|
||||
* `make nix-update-clojure` - Clojure Maven dependencies (updates `nix/deps/clojure/deps.json`)
|
||||
* `make nix-update-gems` - Fastlane Ruby dependencies (updates `fastlane/Gemfile.lock` and `fastlane/gemset.nix`)
|
||||
|
||||
# Manual Steps
|
||||
|
||||
There are a few manual steps you might want to do in order to start contributing.
|
||||
|
||||
## Genymotion Virtualization
|
||||
|
||||
Optionally set up Genymotion if you don't want to use Android Virtual Device:
|
||||
|
||||
https://www.genymotion.com
|
||||
|
||||
## Android Development Environment
|
||||
|
||||
You can also setup Android Development Environment + Simulator:
|
||||
|
||||
https://facebook.github.io/react-native/docs/getting-started.html
|
||||
|
||||
## Configure GitHub Account
|
||||
|
||||
The optimal way of pushing to GitHubis using SSH instead of user/pass auth.
|
||||
|
||||
It's recommented that you [add your public SSH key to your GitHub account](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).
|
||||
|
||||
## Configure GPG Keys for signing commits
|
||||
|
||||
In order to increase security we require all commits in `status-mobile` repo to be signed with a GPG key.
|
||||
|
||||
Steps:
|
||||
1. [Generate a new GPG key](https://help.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key)
|
||||
2. [Setup Git to use your GPG key](https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key)
|
||||
3. [Setup Git to sign commits](https://help.github.com/en/github/authenticating-to-github/signing-commits)
|
||||
4. [Setup GitHub to validate commits](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account)
|
||||
|
||||
## Physical iOS Device
|
||||
|
||||
To use a physical iPhone your device UDID must be added to provisioning profiles and your Apple account invited as Developer to Status team.
|
||||
|
||||
1. [Get your UDID of your iPhone.](https://www.extentia.com/post/finding-the-udid-of-an-ios-device)
|
||||
2. Request from someone with access like @cammellos or @jakubgs to
|
||||
- Add the UDID to development devices on Apple Developer Portal.
|
||||
- Invite your Apple account to be Developer in Status team.
|
||||
3. Run a build in XCode using the project from `status-mobile/ios` directory.
|
||||
- You might see error: `Select a development team in the Signing & Capabilities editor`
|
||||
- Select `Status Research & Development GmbH` as the development team and rebuild again.
|
||||
|
||||
Once build finishes Status should start on your iPhone with its logs in terminal running `make run-metro`.
|
||||
@@ -0,0 +1,40 @@
|
||||
# Testing
|
||||
|
||||
### Unit & integration tests
|
||||
|
||||
To run tests:
|
||||
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
|
||||
To watch the tests:
|
||||
|
||||
```
|
||||
make test-watch
|
||||
```
|
||||
|
||||
To run test in REPL
|
||||
|
||||
```
|
||||
make test
|
||||
yarn shadow-cljs cljs-repl test # or start the REPL in your editor
|
||||
```
|
||||
|
||||
Then start the test process with
|
||||
|
||||
```
|
||||
node --require ./test-resources/override.js target/test/test.js --repl
|
||||
```
|
||||
|
||||
You can run single test in REPL like this
|
||||
|
||||
```clojure
|
||||
(require 'cljs.test)
|
||||
(cljs.test/test-var #'status-im.data-store.chats-test/normalize-chat-test)
|
||||
```
|
||||
|
||||
|
||||
|
||||
Tests will use the bindings in `modules/react-native-status/nodejs`, if you make any changes to these you will need to restart the watcher.
|
||||
@@ -0,0 +1,128 @@
|
||||
# [DEPRECATED] Undefined is not an object evaluating `register_handler_fx`
|
||||
|
||||
## Deprecation note
|
||||
|
||||
This type of error should not occur anymore now that we require the namespace in the `fx.cljs` file.
|
||||
|
||||
It can however happen with other macros requiring a cljs namespace.
|
||||
|
||||
The general fix for that type of issue is to have two files for the namespace where your macros are defined, let's say for `my-project.my-macro` namespace you would have:
|
||||
- my_macro.cljs in which you need `(:require-macros my-project.my-macro)` and `(:require my-project.the-namespace-used-in-the-macro)`
|
||||
- my_macro.clj in which you define the macro
|
||||
|
||||
That way you don't need to use any magical call like `find-ns` or inline `require` with some kind of call only once switch (which was the root cause of another bug in ``defstyle`` macro because the compilation phase at which the evaluation of the switch is done was not properly considered).
|
||||
|
||||
You also want to make sure users are using the macro by using a aliased namespace defined in require statement rather than require-macro and refer to the macro directly. Otherwise it won't require the cljs file and the require statement of the namespace in the macroexpension might not be there.
|
||||
|
||||
## Stacktrace
|
||||
|
||||
```
|
||||
13:25:22, Requiring: hi-base32
|
||||
13:25:23, Possible Unhandled Promise Rejection (id: 0):
|
||||
TypeError: undefined is not an object (evaluating 'status_im.utils.handlers.register_handler_fx')
|
||||
eval code
|
||||
eval@[native code]
|
||||
asyncImportScripts$@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:200728:21
|
||||
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26567:23
|
||||
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26742:32
|
||||
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26567:23
|
||||
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26643:30
|
||||
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26653:21
|
||||
tryCallOne@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3725:16
|
||||
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3826:27
|
||||
_callTimer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:28405:17
|
||||
_callImmediatesPass@http://localhost:8081/index.bundle?pla<…>
|
||||
```
|
||||
|
||||
## Cause
|
||||
|
||||
- stacktrace mentions `register_handler_fx`,
|
||||
- common cause is when requires have been cleaned up and a require of `status-im.utils.handlers` namespace was removed because it looked like it was unused but was actually used through a fx/defn macro
|
||||
|
||||
## Solution
|
||||
|
||||
go through known faulty commit looking for deleted requires
|
||||
|
||||
|
||||
# Git "unable to access" errors during `yarn install`
|
||||
|
||||
## Description
|
||||
Developer updates `package.json` file with a new dependency using a GitHub URL. So it looks like this:
|
||||
```
|
||||
"react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#feature/exportKeyWithPath",
|
||||
```
|
||||
Afterwards, when running e.g. `make run-metro`, they might see the following confusing error:
|
||||
```
|
||||
# macOS
|
||||
fatal: unable to access 'https://github.com/siphiuel/react-native-status-keycard.git/': SSL certificate problem: unable to get local issuer certificate
|
||||
# Linux
|
||||
fatal: unable to access 'https://github.com/status-im/react-native-status-keycard.git/': Could not resolve host: github.com
|
||||
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
|
||||
```
|
||||
|
||||
## Cause
|
||||
`yarn.lock` is not updated to be in sync with `package.json`.
|
||||
|
||||
## Solution
|
||||
Update yarn.lock file. In order to do this, perform the following steps on a clean `status-mobile` repo:
|
||||
```
|
||||
cd status-mobile
|
||||
yarn install
|
||||
```
|
||||
and don't forget to commit updated `yarn.lock` together with `package.json`.
|
||||
|
||||
|
||||
# adb server/client version mismatch errors
|
||||
|
||||
## Description
|
||||
Running some adb commands, e.g. `adb devices` or `make android-ports` (in turn invokes `adb reverse`/`adb forward` commands) may display the following message:
|
||||
```
|
||||
adb server version (40) doesn't match this client (41); killing...
|
||||
```
|
||||
or the reverse
|
||||
```
|
||||
adb server version (41) doesn't match this client (40); killing...
|
||||
```
|
||||
|
||||
This might cause all kinds of difficult-to-debug errors, e.g.:
|
||||
- not being able to find the device through `adb devices`
|
||||
- `make run-android` throwing `com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: device 'device-id' not found.`
|
||||
- `make run-android` throwing `- Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Unable to install /status-mobile/android/app/build/outputs/apk/debug/app-debug.apk com.android.ddmlib.InstallException: EOF`
|
||||
- dropped CLJS repl connections (that have been enabled previously with the help of `make android-ports`)
|
||||
|
||||
## Cause
|
||||
System's local adb and Nix's adb differ. As adb include of server/client processes, this can cause subtle version errors that cause adb to kill mismatching server processes.
|
||||
|
||||
## Solution
|
||||
Always use respective `make` commands, e.g. `make android-ports`, `make android-devices`, etc.
|
||||
|
||||
Alternatively, run adb commands only from `make shell TARGET=android` shell. Don't forget the `TARGET=android` env var setting - otherwise `adb` will still be selected from the system's default location. You can double-check this by running `which adb`.
|
||||
|
||||
# Hot Reloading Crashes
|
||||
## APP Crashes on reloading changes
|
||||
|
||||
### Cause
|
||||
Status-mobile uses `shadow-cljs` for hot reloading changes and uses its own [reloader](https://github.com/status-im/status-mobile/blob/develop/src/status_im/reloader.cljs) for updating them in the running app. If react-native's fast refresh is also enabled then it creates conflicts and crashes the app.
|
||||
|
||||
### Solution
|
||||
Open react native's [In-App Developer Menu](https://reactnative.dev/docs/debugging#accessing-the-in-app-developer-menu) and press "Disable Fast Refresh" or "Disable Hot Reloading"
|
||||
|
||||
## App Crashes after few reloads
|
||||
|
||||
### Cause
|
||||
For x86 CPU architecture Android Devices, Hermes is creating the issue and the app crashes after a few reloads.
|
||||
([Original Issue](https://github.com/status-im/status-mobile/issues/14031))
|
||||
|
||||
<details>
|
||||
<summary>How to Find CPU architecture</summary>
|
||||
|
||||
CPU architecture of android device can be found using
|
||||
- `adb shell uname -m` or
|
||||
- `adb shell getprop ro.product.cpu.abilist`
|
||||
|
||||
</details>
|
||||
|
||||
### Solution
|
||||
Disable Hermes while building the app
|
||||
|
||||
`make run-android DISABLE_HERMES=true`
|
||||
@@ -91,11 +91,30 @@ These guidelines make db.cljs namespaces the place to go when making changes to
|
||||
|
||||
- If manual QA is not needed but all tests don't pass, you can ping @churik or @Serhy to confirm that failed E2E tests are not unrelated.
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
## Translations
|
||||
The app relies on system locale to select a language from the [list of supported languages](https://github.com/status-im/status-mobile/blob/bda73867471cf2bb8a68b1cc27c9f94b92d9a58b/src/status_im/i18n_resources.cljs#L9). It falls back to English in cash the system locale is not supported.
|
||||
|
||||
We use Lokalise App to manage [translations](https://translate.status.im/). In case you need to add/remove a key to translations, you only need to change `en.json`. Missing keys fallback to `en.json`. The actual translations will be added by Lokalise.
|
||||
|
||||
## re-frisk
|
||||
re-frisk is a state visualization tool written by our very own Andrey (@flexsurfer). To start re-frisk, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
## Merging approved PRs
|
||||
|
||||
We don't Github's UI to merge. Instead `./scripts/merge-pr.sh` is used to sign and merge PR to `develop`. You first need to enable [GPG signing on you commits](https://github.com/status-im/status-mobile/blob/develop/STARTING_GUIDE.md#configure-gpg-keys-for-signing-commits).
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
# Debugging
|
||||
|
||||
## Inspecting re-frame with re-frisk
|
||||
`re-frisk` is a state visualization tool written by our very own Andrey (@flexsurfer). With its help you can inspect the current state of app-db, watch event, etc.
|
||||
|
||||

|
||||
|
||||
To start `re-frisk`, execute the following command:
|
||||
```bash
|
||||
$ yarn shadow-cljs run re-frisk-remote.core/start
|
||||
```
|
||||
|
||||
or you can also use make:
|
||||
|
||||
```bash
|
||||
$ make run-re-frisk
|
||||
```
|
||||
|
||||
A server will be started at http://localhost:4567. It might show "not connected" at first. Don't worry and just start using the app. The events and state will populate.
|
||||
|
||||
More details about re-frisk are on the [project page](https://github.com/flexsurfer/re-frisk).
|
||||
|
||||
## Debugging with FlowStorm
|
||||
|
||||
[FlowStorm](http://www.flow-storm.org/) is a free and open-source time-travel
|
||||
debugger for Clojure and ClojureScript. It is capable of recording almost any
|
||||
code execution path in the Status' mobile app.
|
||||
|
||||
FlowStorm is independent of editor/IDE, but a tighter [integration with
|
||||
Emacs](https://github.com/jpmonettas/cider-storm) is available.
|
||||
|
||||
If you are developing with Android, run `make android-ports` first. If you are
|
||||
behind a firewall, allow TCP traffic on port `7722`, then:
|
||||
|
||||
```bash
|
||||
make run-flow-storm
|
||||
```
|
||||
|
||||
You will know FlowStorm is correctly running if you see the status bar with
|
||||
green `REPL` and `RUNTIME` indicators.
|
||||
|
||||
With FlowStorm running, you can now add `#trace` on any top-level form, reload
|
||||
the code, or evaluate the traced form in the REPL, and FlowStorm will start
|
||||
recording data. Avoid `#rtrace` (with `r`) because it can cause massive spikes
|
||||
in CPU which will make the app hang and you might need to forcefully kill
|
||||
processes.
|
||||
|
||||
```clojure
|
||||
#trace ; => Add this line to tell FlowStorm to instrument the function.
|
||||
(defn say-hello []
|
||||
(str "Hello world"))
|
||||
```
|
||||
|
||||
There are other ways to debug, but this is a good start.
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||

|
||||
|
||||
|
||||
## Checking status-go logs
|
||||
While status mobile works it saves logs from `status-go` to `geth.log` file.
|
||||
|
||||
|
||||
### Checking logs from physical device
|
||||
To obtain `geth.log` from physical device you need to shake it and in an opened menu select "Share logs".
|
||||
|
||||

|
||||
|
||||
|
||||
### Checking logs from iOS Simulator
|
||||
When developing with iOS simulator it is more convenient to see the `geth.log` updates in real-time.
|
||||
To do this:
|
||||
- open Activity Monitor
|
||||
- find the "StatusIm" app and doubleclick it
|
||||
- in the opened window select "Open files and ports" and find the full path to `geth.log` (note that it won't appear until you login to Status app)
|
||||
|
||||

|
||||
|
||||
## Inspecting database content
|
||||
|
||||
Encrypted database can be found using commands:
|
||||
```
|
||||
cd ~/Library/Developer/CoreSimulator/Devices
|
||||
find ./ -name accounts.sql
|
||||
```
|
||||
|
||||
To get unencrypted database you need to export it first:
|
||||
- open the status app in simulator
|
||||
- on login screen enter the correct password without logging in
|
||||
- using repl execute statement to export db:
|
||||
```
|
||||
(re-frame.core/dispatch [:multiaccounts.login.ui/export-db-submitted])
|
||||
```
|
||||
- save generated `export.db` file
|
||||
|
||||
Now you can locate the `export.db` and open it with preferred db viewer.
|
||||
|
||||
**Android:**
|
||||
|
||||
```sh
|
||||
adb root
|
||||
adb pull /storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/export.db /path/to/store/export.db
|
||||
```
|
||||
|
||||
If you're using a release build, change the path to `/storage/emulated/0/Android/data/im.status.ethereum/files/Download`
|
||||
|
||||
**iOS**
|
||||
|
||||
```
|
||||
cd ~/Library/Developer/CoreSimulator/Devices
|
||||
find ./ -name export.db
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Tips
|
||||
### From @ilmotta:
|
||||
|
||||
Something I find extremely convenient for Android is to use `adb` to tail logs. I don't use macOS so I don't know if the iOS simulator offers a CLI interface with the same capabilities.
|
||||
|
||||
But here's what I use for example:
|
||||
|
||||
```
|
||||
adb shell tail -n 10 -f /storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/geth.log | grep 'waku.relay'
|
||||
```
|
||||
|
||||
Also to inspect logs in a more flexible manner, instead of the strict output from `make run-metro`, I prefer `adb logcat`. Combined with enabling status-mobile logs in debug by default plus filtering the logs to only what I care during development, I find this helps me inspect the app without running re-frisk because with the debug log level I can already see which events are dispatched (one of the features I like the most from re-frisk).
|
||||
|
||||
```
|
||||
adb logcat | grep 'ReactNativeJS\|StatusModule\|GoLog'
|
||||
```
|
||||
|
||||
### From @clauxx (visual debugging):
|
||||
|
||||
When building/fixing/refactoring components, it can be annoying to set-up the component for instant visual feedback (i.e. finding it in the UI when fixing/refactoring; finding a place for it when building from scratch). Very often if the location of the screen containing your component nested deeply in the app, you might have to do a lot of repeated navigation, nevermind logging in every time the app reloads (even with fast refresh disabled this happens quite often).
|
||||
|
||||
To alleviate this discomfort and make the development cycle more *pleasant*, you can use one of the following options (*_both of which involve the ... REPL ༼ つ ╹ ╹ ༽つ, so make sure you have that set-up with your IDE/editor_*)
|
||||
|
||||
#### REPL-ing to a screen
|
||||
|
||||
This one is straightforward, just evaluate a navigation dispatch form from anywhere:
|
||||
|
||||
```cljs
|
||||
(comment (rf/dispatch [:navigate-to :your-favorite-buggy-screen]))
|
||||
```
|
||||
|
||||
> TIP: you can run this from an untracked user namespace `(ns user)`, from which you can experiment or interact with the REPL. This is where I usually keep my development navigation forms.
|
||||
|
||||
#### REPL-ing a component
|
||||
|
||||
This is also straighforward, but there are some small differences. Just like above, we only have to evaluate a dispatch form, as follows:
|
||||
|
||||
```cljs
|
||||
;; example debugging a quo component, although it could be any other component e.g. from the `status-im2` ns.
|
||||
(comment (re-frame/dispatch [:dev/preview-component
|
||||
[quo/slide-button
|
||||
{:track-icon :face-id
|
||||
:track-text "preview component example"
|
||||
:customization-color :blue
|
||||
:on-complete identity}]]))
|
||||
```
|
||||
|
||||
When evaluated, a full-screen bottom sheet will appear with your component inside. You can make changes to the props or the component internals and re-evaluate the changed forms, after which the component will be re-mounted without running a reload (unless you save the file). Other times it's quicker to just hit save and the component will be reloaded as usual (except for the props you evaluated, which have to be re-evaluated when changed).
|
||||
|
||||
> TIP: You can have multiple versions of the component as separate comments to check for the component variations
|
||||
|
||||
> TIP: You can leave `comment` blocks at the end of component files (other than quo, since can be previewed in other ways) with usages of components, which other developers can use for visualisation/testing.
|
||||
@@ -18,7 +18,7 @@ While neat in theory, it has some serious downsides:
|
||||
As a result of that, more dynamic/state requiring things (like the live tx detail in `/send` command messages) were very hard to do,
|
||||
so instead of "eating our own dogfood", we decided to side-step the API and implement such things as hard-coded logic in the app, while partly
|
||||
retaining the js code for "easier" things (like parameter declaration).
|
||||
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completely
|
||||
Needles to say, such efforts produced code of very poor quality, riddling our app with hard-coded "magic" everywhere in the codebase, completly
|
||||
defeating the point of "dogfooding" while still requiring more effort and being much more error prone (no way to unit test jail logic) because
|
||||
of the need to asynchronously communicate with jail for leftover logic in command messages (the parts not hardcoded in app).
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ accepted
|
||||
|
||||
There was a generally dissatisfaction with our PR flow process from multiple stakeholders, including devs, QA and design. These largely centered around size, speed of integration and quality of PRs.
|
||||
|
||||
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
|
||||
For more details, please see pain points in the meeting notes held end of February here: https://notes.status.im/C5pj8g7gQOu9Wo8PtDZsMw?edit# as well as the preceeding Discuss thread: https://discuss.status.im/t/better-pull-requests-process/1044
|
||||
|
||||
Also see conversations in Core Dev Call #12 and #13: https://github.com/status-im/pm/
|
||||
|
||||
|
||||
@@ -45,4 +45,4 @@ The `State` field in the Pivotal story is used to track the progress of a Pivota
|
||||
| 5 points | 2 - 3 days |
|
||||
| 8 points | ~1 week |
|
||||
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
We should avoid 8 point stories by breaking them down into smaller stories as much as possible.
|
||||
@@ -18,7 +18,7 @@ The whitepaper also proposes that the deposit is only forfeited to the recipient
|
||||
|
||||
Considering:
|
||||
- the absence of efficient ways to perform anonymous transactions (zk-snarks could be used in the future for that)
|
||||
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be practical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
|
||||
- the impossibility to prove that a recipient has made an actual reply and not some kind of automated reply (captcha solution was proposed, but wouldn't be pratical until we can use a solution such as swarm feeds that allow users to make free updates to their captcha without on-chain transactions)
|
||||
- the limited time to develop the feature
|
||||
|
||||
We opted for a solution that:
|
||||
@@ -28,8 +28,8 @@ We opted for a solution that:
|
||||
|
||||
## Manifests
|
||||
|
||||
Since TtT related information aren't stored on chain, they need to be stored somewhere else.
|
||||
For the first iteration of TtT we opted for IPFS, which is already used across the app for other forms of content, through Infura IPFS gateway.
|
||||
Since TtT related informations aren't stored on chain, they need to be stored somewhere else.
|
||||
For the first iteration of TtT we opted for IPFS, which is already used accross the app for other forms of content, through Infura IPFS gateway.
|
||||
|
||||
On IPFS we store what we call a ttt manifest, which is a json file with the following format:
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# 0014. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | wallet team |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed
|
||||
|
||||
## Context:
|
||||
|
||||
In order to try out vertical team, which is a structure that is wanted by the company, we will be creating a wallet team within the mobile team.
|
||||
Some member of the mobile team will join the current wallet team, which is composed by developers from desktop and lead by @alaibe, on a voluntary basis.
|
||||
The responsibilities of the team are to implement the new wallet UI, with the support of the current wallet team, which will be assisting with the status-go work.
|
||||
|
||||
## Decision
|
||||
|
||||
The team members for the initial wallet team are:
|
||||
|
||||
- @rasom
|
||||
- @OmarBasem
|
||||
- @vkjr
|
||||
- @J-Son89
|
||||
- @briansztamfater
|
||||
- @smohamedjavid
|
||||
- @ulisesmac
|
||||
- @erikseppanen
|
||||
- @mmilad75
|
||||
- @tumanov-alex
|
||||
@@ -1,46 +0,0 @@
|
||||
# 0015. Team-structure
|
||||
|
||||
| Date | Tags |
|
||||
|---|---|
|
||||
| 2023-06-16 | changes in team structure |
|
||||
|
||||
## Status
|
||||
|
||||
Proposed/partially implemented
|
||||
|
||||
## Context:
|
||||
|
||||
Currently, there is only a single team lead in the mobile development team, and after a meeting with the design team, it has been identified that the mobile app lacks polishness. One of the main issues identified is a lack of oversight in certain areas. To address this problem, it has been decided to create an additional role within the team. For each section of the mobile app (communities, syncing & onboarding, activity center & shell, wallet, messaging), a person will be selected to fulfill the responsibilities outlined below.
|
||||
|
||||
## Decision
|
||||
|
||||
The decision is to create an additional role within the mobile development team for each section. The individuals selected for these roles will have the following responsibilities:
|
||||
|
||||
- Ensure GitHub issues are created for new features/designs of the section.
|
||||
- Ensure issues are adequately described and linked as best as possible.
|
||||
- Ensure issues have a grooming session where other developers can provide their feedback before working on the set of issues.
|
||||
- Ensure all relevant parties are invited, such as designers, QA, Product Owner, leads, etc., as needed (including the designer who created the feature).
|
||||
- Ensure there is consensus among the developers working on the section about the decided strategy approach. Ideally, this consensus should be documented.
|
||||
- Ensure UI quality by organizing designer reviews and guaranteeing pixel perfection.
|
||||
- Ensure overall implementation is satisfactory based on the predefined requirements.
|
||||
- Ensure alignment between desktop, web, and mobile versions for the respective section in collaboration with the mobile developers and design team.
|
||||
- Act as a point of contact for the design team with respect to the section.
|
||||
- Ensure that someone goes through the designs once they are created with the respective designer.
|
||||
- Assist the design team with technical feasibility analysis and address any product concerns.
|
||||
- Facilitate the growth of the next team member into the role.
|
||||
|
||||
The people identified for each sections are as follow:
|
||||
|
||||
- Messaging @flexsurfer, followed by @alwx
|
||||
- Syncing & Onboarding @siddarthkay
|
||||
- Communities @ilmotta, followed by @ajayesivan
|
||||
- Activity Center & Shell @J-Son89, followed by @Parveshdhull
|
||||
- Wallet (once the vertical team is created) @J-Son89, followed by @briansztamfater
|
||||
|
||||
This will be a rotating post, every 4 months it will go to the next in line.
|
||||
|
||||
The wallet team might have longer times for rotation, as stability might be more important. That's still to be decided.
|
||||
|
||||
# Follow-up Actions
|
||||
|
||||
- Find suitable next in line for Messaging, Onboarding, Communities
|
||||
@@ -1,31 +0,0 @@
|
||||
### How should the paste button behave when clipboard is empty?
|
||||
|
||||
This question first came up as a review comment to this PR
|
||||
https://github.com/status-im/status-mobile/pull/16852
|
||||
|
||||
There were 2 considerations :
|
||||
- Either keep the paste button disabled when there is nothing in the clipboard OR
|
||||
- Always keep the paste button enabled
|
||||
|
||||
There were positives and negatives for both approaches.
|
||||
|
||||
Positives of keeping paste button disabled when there is nothing in clipboard would require us to
|
||||
check the value of clipboard as soon as the component is mounted (i.e when the user first sees
|
||||
the screen). In iOS this means a native permissions dialog would appear requesting for permissions
|
||||
to paste from the clipboard.
|
||||
|
||||
Negatives of this approach is that as soon as any user navigates to this screen they are greeted with
|
||||
this popup which can be annoying sometimes.
|
||||
|
||||
Positives of keeping paste button always enabled is that we can trigger a request to the clipboard on
|
||||
tap of the paste button which would trigger the native permissions dialog requesting for permissions
|
||||
to paste from the clipboard.
|
||||
In this case seeing this dialog is okay because the user has initiated a paste action.
|
||||
|
||||
Negatives of this approach is that in the event the clipboard is empty the user will still see the
|
||||
system dialog and on approving nothing will be pasted (because the clipboard was empty).
|
||||
This behaviour can be confusing.
|
||||
|
||||
On consulting the Design Team via discord it was concluded that out of the two approaches
|
||||
having the paste button always enabled is a better UX overall.
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
## "@react-native-community/netinfo": "^3.2.1"
|
||||
|
||||
no known issue while updating version
|
||||
|
||||
used to monitor network information (connected, expensive, connection type)
|
||||
|
||||
## "bignumber.js": "git+https://github.com/status-im/bignumber.js.git#v4.0.2-status"
|
||||
|
||||
used to work with big numbers in JS
|
||||
BN.js (used in web3-utils) doesn't support decimals, though we could work without decimals
|
||||
|
||||
should be replaced by JSBI https://github.com/GoogleChromeLabs/jsbi/blob/master/README.md
|
||||
see web-utils issue: https://github.com/ethereum/web3.js/issues/2171
|
||||
|
||||
## "buffer": "^5.4.2"
|
||||
|
||||
required by bignumber.js otherwise there is a compilation error
|
||||
|
||||
## "chance": "^1.1.0"
|
||||
|
||||
used to generate guids and random values in `status-im.utils.random`
|
||||
|
||||
## "emojilib": "^2.4.0"
|
||||
|
||||
used for emojis
|
||||
|
||||
## "eth-phishing-detect": "^1.1.13"
|
||||
|
||||
used to check if URL is known for phishing
|
||||
|
||||
## "hi-base32": "^0.5.0"
|
||||
|
||||
used only in `status-im.browser.core` to convert base58 hash into base32 hash
|
||||
TODO: could be replaced by a simple implementation of ascii to base32
|
||||
|
||||
## "i18n-js": "^3.3.0"
|
||||
|
||||
used to manage translations
|
||||
|
||||
## "identicon.js": "git+https://github.com/status-im/identicon.js.git#v1.2.1-status"
|
||||
|
||||
TODO: switch to latest upstream version, fork is seriously outdated and changes have been merged to master long time ago
|
||||
used to generate identicons
|
||||
|
||||
## "qrcode": "^1.4.1"
|
||||
|
||||
used to generate QR code
|
||||
|
||||
## "react": "16.8.3"
|
||||
|
||||
react library, update based on react-native recommendation
|
||||
|
||||
## "react-dom": "16.4.2"
|
||||
|
||||
react library, update based on react-native recommendation
|
||||
|
||||
## "react-native": "git+https://github.com/status-im/react-native.git#v0.59.10"
|
||||
|
||||
react-native
|
||||
|
||||
TODO: forked because of specific markdown handling, should be bountied to be turned into a library so we can go back to upstream version
|
||||
|
||||
## "react-native-background-timer": "^2.1.1"
|
||||
|
||||
used to have setTimeout and setInterval that don't trigger yellow warning about long timeouts
|
||||
|
||||
## "react-native-camera": "git+https://github.com/status-im/react-native-camera.git#v1.1.5-1-status"
|
||||
|
||||
used to read QR code and take profile picture
|
||||
TODO: update version, this one doesn't work with Android (done in react-native upgrade branch)
|
||||
|
||||
## "react-native-config": "git+https://github.com/status-im/react-native-config.git#0.11.2-1"
|
||||
|
||||
used to fetch config values from env
|
||||
TODO: not sure fork usage is justified
|
||||
|
||||
## "react-native-dialogs": "^1.0.5"
|
||||
|
||||
used to show dialogs but only in android in list selection `status-im.ui.components.list-selection`, iOS uses action-sheet
|
||||
TODO: see if we should actually remove it
|
||||
|
||||
## "react-native-fetch-polyfill": "^1.1.3"
|
||||
|
||||
used to be able to put a timeout on fetch request
|
||||
TODO: check if the fetch timeout is actually aborting the request or only ignoring the callback on the response, if it
|
||||
doesn't then this is useless and we are better of using a simple seTimeout
|
||||
|
||||
## "react-native-fs": "^2.14.1"
|
||||
|
||||
used for some filesystem related functions, for instance to get no-backup directory in `status-im.utils.platform`
|
||||
|
||||
## "react-native-gesture-handler": "1.3.0"
|
||||
|
||||
library used by react-navigation
|
||||
use version recommended by react-navigation
|
||||
|
||||
## "react-native-image-crop-picker": "^0.18.2"
|
||||
|
||||
used for profile picture
|
||||
|
||||
## "react-native-image-resizer": "git+https://github.com/status-im/react-native-image-resizer.git#1.0.##-status"
|
||||
|
||||
used for profile picture
|
||||
|
||||
## "react-native-keychain": "git+https://github.com/status-im/react-native-keychain.git#v.3.0.0-status"
|
||||
|
||||
used for storing password when user saves password
|
||||
TODO: check if fork is necessary, merge with upstream?
|
||||
|
||||
## "react-native-mail": "git+https://github.com/status-im/react-native-mail.git#v3.0.8_status"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
|
||||
## "react-native-screens": "1.0.0-alpha.22"
|
||||
|
||||
used by react-navigation
|
||||
|
||||
TODO: update once bug is fixed for Android that causes crash when app is back from background after being put in background with hardware backbutton press
|
||||
|
||||
## "react-native-shake": "^3.3.1"
|
||||
|
||||
used to send email to support when phone is shaked
|
||||
|
||||
## "react-native-lottie-splash-screen": "^1.0.1"
|
||||
|
||||
used to make splash screen with lottie animation during initial loading for android, also used as replacement of "react-native-splash-screen" for iOS
|
||||
|
||||
## "react-native-status-keycard": "^2.5.7"
|
||||
|
||||
used for keycard
|
||||
|
||||
## "react-native-svg": "9.7.1"
|
||||
|
||||
used for svg icons, mostly collectibles are using svg
|
||||
TODO: updating requires a pod update on iOS
|
||||
|
||||
## "react-native-biometrics": "^3.0.1"
|
||||
|
||||
used for biometric authentication on Android and iOS
|
||||
|
||||
## "react-native-webview": "git+https://github.com/status-im/react-native-webview.git#v8.0.7_3"
|
||||
|
||||
used for browser
|
||||
|
||||
## "react-navigation": "3.11.0"
|
||||
|
||||
used for native navigation
|
||||
fixed because even bugfix version upgrade causes runtime errors with current version of react-native
|
||||
|
||||
## "react-native-draggable-flatlist": "https://github.com/computerjazz/react-native-draggable-flatlist"
|
||||
|
||||
A drag-and-drop-enabled FlatList component for React Native
|
||||
|
||||
## "react-native-shadow-2": "https://github.com/SrBrahma/react-native-shadow-2"
|
||||
|
||||
A shadow component that is consistent across both platforms
|
||||
|
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 231 KiB |
@@ -1,15 +0,0 @@
|
||||
# new icons
|
||||
|
||||
## Export icons
|
||||
|
||||

|
||||
|
||||
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons2`
|
||||
2. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name@2x.png"` should be renamed to `"icon_name@2x.png"`.
|
||||
3. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
|
||||
```clojure
|
||||
;; icon_name.png
|
||||
[vector-icons/icon :icon-name {:color ...}]
|
||||
```
|
||||
2x@2x
|
||||
4. If you want platform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
@@ -1,40 +0,0 @@
|
||||
# How to catch crash on ios use xcode
|
||||
|
||||
## Overview
|
||||
Sometimes, we can't reproduce crash with local dev build, probably because your built version differs from the one QA team used.
|
||||
The QA team mostly used the PR build version. In this guide we will try to make a build as close as possible to the PR build for iOS.
|
||||
|
||||
You may notice various configuration files starting with .env (such as .env, .env.e2e, .env.jenkins) in the project.
|
||||
The usage of these files and environment variables injected at build time on CI will not be covered in this guide.
|
||||
|
||||
This guide covers how to configure Xcode to capture a crash stack trace with a physical iOS device. This allows debugging crashes by inspecting the stack trace.
|
||||
I will use [issue #17255](https://github.com/status-im/status-mobile/issues/17255) as an example to reproduce and analyze a crash.
|
||||
|
||||
## Prerequisites
|
||||
- A physical ios device (simulator is not considered in this doc)
|
||||
- Xcode installed
|
||||
|
||||
## Steps
|
||||
1. Prepare Status Mobile
|
||||
1. Open Terminal, cd to project root
|
||||
2. Run `make run-clojure` in one tab
|
||||
3. Run `make run-metro` in a second tab
|
||||
4. Run `make pod-install` in a third tab
|
||||
2. Configure Xcode Project
|
||||
1. Open Xcode
|
||||
2. Open a project or file, navigate to folder `path_to_root_directory_of_status_mobile/ios`
|
||||
3. Set Scheme `StatusImPR` as current scheme 
|
||||
4. Edit scheme 
|
||||
5. Change `Info` 
|
||||
6. Change `Diagnostics` 
|
||||
7. Set automatically manage signing 
|
||||
3. Update Code
|
||||
1. Edit `src/status_im2/setup/dev.cljs`, comment out lines 47-52 
|
||||
2. Edit `shadow-cljs.edn`, comment out `re-frisk-remote.preload`, otherwise it will try to connect `localhost:4567` on physical device which could slow down performance 
|
||||
4. Reproduce Crash And Analyze
|
||||
1. Choose your physical ios device as target device and Run
|
||||
2. Follow reproduce steps from [issue #17255](https://github.com/status-im/status-mobile/issues/17255) mentioned and xcode will halt at crash point 
|
||||
3. Inspect stack trace to identify root cause. From the stack trace, we can locate the crash happened in `api/geth_backend.go:1048`(createTempDBFile) clearly! 
|
||||
|
||||
## Links
|
||||
- [changes](https://github.com/status-im/status-mobile/commit/4306d419de15e737e8ded3a749cc5e8d6a06e627) to source code
|
||||