Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b778f62e6d | ||
|
|
ac6e3cdb2c | ||
|
|
691c6b67ce |
@@ -1,5 +1,4 @@
|
|||||||
{:config-paths ["status-im"]
|
{: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
|
:lint-as {legacy.status-im.utils.views/defview clojure.core/defn
|
||||||
legacy.status-im.utils.views/letsubs clojure.core/let
|
legacy.status-im.utils.views/letsubs clojure.core/let
|
||||||
reagent.core/with-let clojure.core/let
|
reagent.core/with-let clojure.core/let
|
||||||
@@ -10,16 +9,12 @@
|
|||||||
legacy.status-im.utils.styles/def clojure.core/def
|
legacy.status-im.utils.styles/def clojure.core/def
|
||||||
legacy.status-im.utils.styles/defn clojure.core/defn
|
legacy.status-im.utils.styles/defn clojure.core/defn
|
||||||
test-helpers.unit/deftest-sub 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}
|
taoensso.tufte/defnp clojure.core/defn}
|
||||||
:linters {:case-duplicate-test {:level :error}
|
:linters {:case-duplicate-test {:level :error}
|
||||||
:case-quoted-test {:level :error}
|
:case-quoted-test {:level :error}
|
||||||
:case-symbol-test {:level :error}
|
:case-symbol-test {:level :error}
|
||||||
:clj-kondo-config {:level :error}
|
:clj-kondo-config {:level :error}
|
||||||
:cond-else {:level :error}
|
:cond-else {:level :error}
|
||||||
:condition-always-true {:level :error}
|
|
||||||
:conflicting-alias {:level :error}
|
|
||||||
:consistent-alias {:level :error
|
:consistent-alias {:level :error
|
||||||
:aliases {clojure.set set
|
:aliases {clojure.set set
|
||||||
clojure.string string
|
clojure.string string
|
||||||
@@ -31,7 +26,7 @@
|
|||||||
malli.generator malli.generator
|
malli.generator malli.generator
|
||||||
malli.transform malli.transform
|
malli.transform malli.transform
|
||||||
malli.util malli.util
|
malli.util malli.util
|
||||||
promesa.core promesa
|
promesa.core p
|
||||||
schema.core schema
|
schema.core schema
|
||||||
status-im.feature-flags ff
|
status-im.feature-flags ff
|
||||||
taoensso.timbre log}}
|
taoensso.timbre log}}
|
||||||
@@ -47,13 +42,11 @@
|
|||||||
:missing-body-in-when {:level :error}
|
:missing-body-in-when {:level :error}
|
||||||
:missing-clause-in-try {:level :error}
|
:missing-clause-in-try {:level :error}
|
||||||
:missing-else-branch {:level :error}
|
:missing-else-branch {:level :error}
|
||||||
:multiple-async-in-deftest {:level :error}
|
|
||||||
:not-empty? {:level :error}
|
:not-empty? {:level :error}
|
||||||
:plus-one {:level :error}
|
:plus-one {:level :error}
|
||||||
:redundant-do {:level :error}
|
:redundant-do {:level :error}
|
||||||
:redundant-let {:level :error}
|
:redundant-let {:level :error}
|
||||||
:refer-all {:level :error}
|
:refer-all {:level :error}
|
||||||
:shadowed-fn-param {:level :error}
|
|
||||||
:shadowed-var {:level :error
|
:shadowed-var {:level :error
|
||||||
;; We temporarily use :include to define an
|
;; We temporarily use :include to define an
|
||||||
;; allowlist of core Clojure vars. In the
|
;; allowlist of core Clojure vars. In the
|
||||||
@@ -61,11 +54,9 @@
|
|||||||
;; vars, we should be able to delete this
|
;; vars, we should be able to delete this
|
||||||
;; option and lint all vars.
|
;; option and lint all vars.
|
||||||
:exclude [type name]}
|
:exclude [type name]}
|
||||||
:self-requiring-namespace {:level :error}
|
|
||||||
:single-operand-comparison {:level :error}
|
:single-operand-comparison {:level :error}
|
||||||
:syntax {:level :error}
|
:syntax {:level :error}
|
||||||
:unbound-destructuring-default {:level :error}
|
:unbound-destructuring-default {:level :error}
|
||||||
:underscore-in-namespace {:level :error}
|
|
||||||
:uninitialized-var {:level :error}
|
:uninitialized-var {:level :error}
|
||||||
:unknown-require-option {:level :error}
|
:unknown-require-option {:level :error}
|
||||||
:unreachable-code {:level :error}
|
:unreachable-code {:level :error}
|
||||||
@@ -74,8 +65,7 @@
|
|||||||
;; https://github.com/borkdude/clj-kondo/issues/867
|
;; https://github.com/borkdude/clj-kondo/issues/867
|
||||||
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
|
||||||
number
|
number
|
||||||
legacy.status-im.test-helpers/restore-app-db
|
legacy.status-im.test-helpers/restore-app-db]}
|
||||||
(cljs.test/is [match-strict?])]}
|
|
||||||
:unresolved-var {:level :error}
|
:unresolved-var {:level :error}
|
||||||
:unsorted-required-namespaces {:level :error}
|
:unsorted-required-namespaces {:level :error}
|
||||||
:unused-alias {:level :warning}
|
:unused-alias {:level :warning}
|
||||||
|
|||||||
@@ -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))")})
|
|
||||||
)
|
|
||||||
@@ -4,8 +4,5 @@
|
|||||||
test-helpers.component/get-all-by-translation-text 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/get-by-translation-text utils.i18n/label
|
||||||
test-helpers.component/query-all-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
|
test-helpers.component/query-by-translation-text utils.i18n/label}}
|
||||||
|
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
|
||||||
cljs.test/deftest cljs.test/deftest}}
|
|
||||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}
|
|
||||||
:status-im.linter/inconsistent-test-name {:level :error}}}
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ DEFAULT_NETWORK=mainnet_rpc
|
|||||||
DEV_BUILD=1
|
DEV_BUILD=1
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
|
FLEET=status.prod
|
||||||
GROUP_CHATS_ENABLED=1
|
GROUP_CHATS_ENABLED=1
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL=info
|
||||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||||
@@ -25,6 +26,7 @@ APN_TOPIC=im.status.ethereum.pr
|
|||||||
COMMUNITIES_ENABLED=1
|
COMMUNITIES_ENABLED=1
|
||||||
DATABASE_MANAGEMENT_ENABLED=1
|
DATABASE_MANAGEMENT_ENABLED=1
|
||||||
DELETE_MESSAGE_ENABLED=1
|
DELETE_MESSAGE_ENABLED=1
|
||||||
|
COLLECTIBLES_ENABLED=1
|
||||||
COMMANDS_ENABLED=1
|
COMMANDS_ENABLED=1
|
||||||
TWO_MINUTES_SYNCING=1
|
TWO_MINUTES_SYNCING=1
|
||||||
SWAP_ENABLED=1
|
SWAP_ENABLED=1
|
||||||
@@ -32,7 +34,4 @@ STICKERS_TEST_ENABLED=1
|
|||||||
LOCAL_PAIRING_ENABLED=1
|
LOCAL_PAIRING_ENABLED=1
|
||||||
TEST_STATEOFUS=1
|
TEST_STATEOFUS=1
|
||||||
FAST_CREATE_COMMUNITY_ENABLED=1
|
FAST_CREATE_COMMUNITY_ENABLED=1
|
||||||
TEST_NETWORKS_ENABLED=1
|
FLAG_NEW_CONTACT_UI_ENABLED=0
|
||||||
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
|
DEFAULT_NETWORK=goerli_rpc
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
FLEET=status.staging
|
FLEET=status.prod
|
||||||
GROUP_CHATS_ENABLED=1
|
GROUP_CHATS_ENABLED=1
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||||
@@ -33,10 +33,3 @@ TWO_MINUTES_SYNCING=1
|
|||||||
STICKERS_TEST_ENABLED=1
|
STICKERS_TEST_ENABLED=1
|
||||||
LOCAL_PAIRING_ENABLED=1
|
LOCAL_PAIRING_ENABLED=1
|
||||||
FAST_CREATE_COMMUNITY_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
|
DEFAULT_NETWORK=goerli_rpc
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
|
FLEET=status.prod
|
||||||
GROUP_CHATS_ENABLED=1
|
GROUP_CHATS_ENABLED=1
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||||
@@ -34,6 +35,3 @@ ENABLE_QUO_PREVIEW=1
|
|||||||
STICKERS_TEST_ENABLED=1
|
STICKERS_TEST_ENABLED=1
|
||||||
LOCAL_PAIRING_ENABLED=1
|
LOCAL_PAIRING_ENABLED=1
|
||||||
FAST_CREATE_COMMUNITY_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
|
DEFAULT_NETWORK=mainnet_rpc
|
||||||
ETHEREUM_DEV_CLUSTER=1
|
ETHEREUM_DEV_CLUSTER=1
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
|
FLEET=status.prod
|
||||||
GROUP_CHATS_ENABLED=1
|
GROUP_CHATS_ENABLED=1
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL=info
|
||||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||||
@@ -21,6 +22,3 @@ COMMUNITIES_ENABLED=1
|
|||||||
DATABASE_MANAGEMENT_ENABLED=1
|
DATABASE_MANAGEMENT_ENABLED=1
|
||||||
DELETE_MESSAGE_ENABLED=1
|
DELETE_MESSAGE_ENABLED=1
|
||||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
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
|
DEFAULT_NETWORK=mainnet_rpc
|
||||||
ETHEREUM_DEV_CLUSTER=0
|
ETHEREUM_DEV_CLUSTER=0
|
||||||
EXTENSIONS=0
|
EXTENSIONS=0
|
||||||
|
FLEET=status.prod
|
||||||
GROUP_CHATS_ENABLED=1
|
GROUP_CHATS_ENABLED=1
|
||||||
LOG_LEVEL=
|
LOG_LEVEL=
|
||||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||||
@@ -17,7 +18,5 @@ PARTITIONED_TOPIC=0
|
|||||||
ENABLE_ROOT_ALERT=1
|
ENABLE_ROOT_ALERT=1
|
||||||
MAX_IMAGES_BATCH=1
|
MAX_IMAGES_BATCH=1
|
||||||
DELETE_MESSAGE_ENABLED=1
|
DELETE_MESSAGE_ENABLED=1
|
||||||
|
COLLECTIBLES_ENABLED=1
|
||||||
FAST_CREATE_COMMUNITY_ENABLED=0
|
FAST_CREATE_COMMUNITY_ENABLED=0
|
||||||
TEST_NETWORKS_ENABLED=0
|
|
||||||
STATUS_PROXY_STAGE_NAME=prod
|
|
||||||
FLAG_WALLET_CONNECT_ENABLED=1
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
name: Bug Report
|
name: MVPBug Report
|
||||||
about: Bug Report
|
about: MVPBug Report
|
||||||
title: ''
|
title: ''
|
||||||
labels: ['bug', ':1234: low prio']
|
labels: 'E:Mobile Bug MVP'
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -70,19 +70,3 @@ Documentation change PR (review please): https://github.com/status-im/status.im/
|
|||||||
| 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. |
|
| 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 -->
|
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.
|
|
||||||
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|||||||
@@ -83,9 +83,6 @@ shim.js
|
|||||||
figwheel_server.log
|
figwheel_server.log
|
||||||
.nrepl-port
|
.nrepl-port
|
||||||
|
|
||||||
# FlowStorm (Clojure debugger)
|
|
||||||
repl-client-debug
|
|
||||||
|
|
||||||
# Lein
|
# Lein
|
||||||
#
|
#
|
||||||
.lein-failures
|
.lein-failures
|
||||||
@@ -130,8 +127,6 @@ fastlane/README.md
|
|||||||
# Clj
|
# Clj
|
||||||
|
|
||||||
.cpcache/
|
.cpcache/
|
||||||
src/user.cljs
|
|
||||||
src/dev/user.cljs
|
|
||||||
|
|
||||||
# emacs
|
# emacs
|
||||||
.dir-locals.el
|
.dir-locals.el
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
/*
|
*
|
||||||
|
|
||||||
# Format top-level js files.
|
|
||||||
!*.js
|
!*.js
|
||||||
|
!*/
|
||||||
# Ignore all except src/js/**/*.js
|
*.clj-kondo
|
||||||
!/src/
|
*.shadow-cljs
|
||||||
/src/*
|
modules
|
||||||
!/src/js
|
result
|
||||||
!/src/js/**/*.js
|
target
|
||||||
|
component-spec
|
||||||
# Ignore all except translations/en.json
|
/app
|
||||||
!/translations/
|
|
||||||
/translations/*
|
|
||||||
!/translations/en.json
|
|
||||||
|
|||||||
@@ -6,8 +6,4 @@ module.exports = {
|
|||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
trailingComma: 'all',
|
trailingComma: 'all',
|
||||||
useTabs: false,
|
useTabs: false,
|
||||||
|
|
||||||
// JSON sorting
|
|
||||||
jsonSortOrder: '{ "/.*/": "caseInsensitiveLexical" } ',
|
|
||||||
plugins: ['prettier-plugin-sort-json'],
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
"reg-fx" :arg1-pair
|
"reg-fx" :arg1-pair
|
||||||
"testing" :arg1-body
|
"testing" :arg1-body
|
||||||
"deftest-sub" :arg1-body
|
"deftest-sub" :arg1-body
|
||||||
"deftest-event" :arg1-body
|
|
||||||
"test-async" :arg1-body
|
"test-async" :arg1-body
|
||||||
"wait-for" :arg1-body
|
"wait-for" :arg1-body
|
||||||
"with-deps-check" :arg1-body
|
"with-deps-check" :arg1-body
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ ifndef BUILD_TAG
|
|||||||
export BUILD_TAG := $(shell git rev-parse --short HEAD)
|
export BUILD_TAG := $(shell git rev-parse --short HEAD)
|
||||||
endif
|
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)
|
export TMPDIR = /tmp/tmp-status-mobile-$(BUILD_TAG)
|
||||||
# This has to be specified for both the Node.JS server process and the Qt process.
|
# This has to be specified for both the Node.JS server process and the Qt process.
|
||||||
export REACT_SERVER_PORT ?= 5001
|
export REACT_SERVER_PORT ?= 5001
|
||||||
@@ -139,7 +139,7 @@ _install-hooks: ##@prepare Create prepare-commit-msg git hook symlink
|
|||||||
|
|
||||||
# Remove directories and ignored files
|
# Remove directories and ignored files
|
||||||
clean: SHELL := /bin/sh
|
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
|
git clean -dXf
|
||||||
|
|
||||||
# Remove directories, ignored and non-ignored files
|
# Remove directories, ignored and non-ignored files
|
||||||
@@ -196,10 +196,6 @@ xcode-clean: XCODE_HOME := $(HOME)/Library/Developer/Xcode
|
|||||||
xcode-clean: ##@prepare Clean XCode derived data and archives
|
xcode-clean: ##@prepare Clean XCode derived data and archives
|
||||||
rm -fr $(XCODE_HOME)/DerivedData/StatusIm-* $(XCODE_HOME)/Archives/*/StatusIm*
|
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
|
# Release builds
|
||||||
#----------------
|
#----------------
|
||||||
@@ -215,13 +211,15 @@ build-fdroid: ##@build Build release for F-Droid
|
|||||||
build-android: export BUILD_ENV ?= prod
|
build-android: export BUILD_ENV ?= prod
|
||||||
build-android: export BUILD_TYPE ?= nightly
|
build-android: export BUILD_TYPE ?= nightly
|
||||||
build-android: export ORG_GRADLE_PROJECT_versionCode ?= $(TMP_BUILD_NUMBER)
|
build-android: export ORG_GRADLE_PROJECT_versionCode ?= $(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
|
build-android: ##@build Build unsigned Android APK
|
||||||
@scripts/build-android.sh
|
@scripts/build-android.sh
|
||||||
|
|
||||||
release-android: export TARGET := keytool
|
release-android: export TARGET := keytool
|
||||||
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||||
release-android: keystore build-android ##@build Build signed Android APK
|
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 TARGET := ios
|
||||||
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
|
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
|
||||||
@@ -315,7 +313,7 @@ lint: ##@test Run code style checks
|
|||||||
scripts/lint/translations.clj && \
|
scripts/lint/translations.clj && \
|
||||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||||
sh scripts/lint/trailing-newline.sh && \
|
sh scripts/lint/trailing-newline.sh && \
|
||||||
node_modules/.bin/prettier --check .
|
node_modules/.bin/prettier --write .
|
||||||
|
|
||||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||||
lint-fix: export TARGET := clojure
|
lint-fix: export TARGET := clojure
|
||||||
@@ -351,17 +349,15 @@ test: export SHADOW_NS_REGEXP := .*-test$$
|
|||||||
test: ##@test Run all Clojure tests
|
test: ##@test Run all Clojure tests
|
||||||
test: _test-clojure
|
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_OUTPUT_TO := target/test/test.js
|
||||||
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
|
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
|
||||||
|
test-watch-for-repl: status-go-library
|
||||||
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
|
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
|
||||||
rm -f "$$SHADOW_OUTPUT_TO" && \
|
yarn node-pre-gyp rebuild
|
||||||
yarn install && shadow-cljs compile mocks && \
|
rm -f target/test/test.js
|
||||||
|
yarn shadow-cljs compile mocks && \
|
||||||
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
|
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)\"}'" \
|
'yarn shadow-cljs watch test --verbose' \
|
||||||
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
|
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
|
||||||
|
|
||||||
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
|
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
|
||||||
@@ -379,41 +375,30 @@ test-contract: export SHADOW_NS_REGEXP := ^tests\.contract-test.*$$
|
|||||||
test-contract: ##@test Run contract tests
|
test-contract: ##@test Run contract tests
|
||||||
test-contract: _test-clojure
|
test-contract: _test-clojure
|
||||||
|
|
||||||
test-android: jsbundle
|
android-test: jsbundle
|
||||||
test-android: export TARGET := android
|
android-test: export TARGET := android
|
||||||
test-android: ##@test Android Gradle test
|
android-test:
|
||||||
cd android && ./gradlew test
|
cd android && ./gradlew test
|
||||||
|
|
||||||
test-component-watch: export TARGET := clojure
|
component-test-watch: export TARGET := clojure
|
||||||
test-component-watch: export COMPONENT_TEST := true
|
component-test-watch: export COMPONENT_TEST := true
|
||||||
test-component-watch: export BABEL_ENV := test
|
component-test-watch: export BABEL_ENV := test
|
||||||
test-component-watch: export JEST_USE_SILENT_REPORTER := false
|
component-test-watch: export JEST_USE_SILENT_REPORTER := false
|
||||||
test-component-watch: ##@ Watch tests and re-run no changes to cljs files
|
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
|
||||||
@scripts/check-metro-shadow-process.sh
|
@scripts/check-metro-shadow-process.sh
|
||||||
rm -rf ./component-spec
|
rm -rf ./component-spec
|
||||||
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
|
||||||
|
|
||||||
test-component: export TARGET := clojure
|
component-test: export TARGET := clojure
|
||||||
test-component: export COMPONENT_TEST := true
|
component-test: export COMPONENT_TEST := true
|
||||||
test-component: export BABEL_ENV := test
|
component-test: export BABEL_ENV := test
|
||||||
test-component: export JEST_USE_SILENT_REPORTER := false
|
component-test: export JEST_USE_SILENT_REPORTER := false
|
||||||
test-component: ##@test Run component tests once in NodeJS
|
component-test: ##@test Run component tests once in NodeJS
|
||||||
@scripts/check-metro-shadow-process.sh
|
@scripts/check-metro-shadow-process.sh
|
||||||
rm -rf ./component-spec
|
rm -rf ./component-spec
|
||||||
yarn shadow-cljs compile component-test && \
|
yarn shadow-cljs compile component-test && \
|
||||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||||
|
|
||||||
# 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
|
# Other
|
||||||
#--------------
|
#--------------
|
||||||
@@ -424,48 +409,25 @@ geth-connect: ##@other Connect to Geth on the device
|
|||||||
build/bin/geth attach http://localhost:8545
|
build/bin/geth attach http://localhost:8545
|
||||||
|
|
||||||
ios-clean: SHELL := /bin/sh
|
ios-clean: SHELL := /bin/sh
|
||||||
ios-clean: ios-simulator-cache-clean
|
|
||||||
ios-clean: ##@prepare Clean iOS build artifacts
|
ios-clean: ##@prepare Clean iOS build artifacts
|
||||||
git clean -dxf -f target/ios
|
git clean -dxf -f target/ios
|
||||||
|
|
||||||
android-clean: SHELL := /bin/sh
|
android-clean: export TARGET := gradle
|
||||||
android-clean: ##@prepare Clean Gradle state
|
android-clean: ##@prepare Clean Gradle state
|
||||||
git clean -dxf -f ./android/app/build; \
|
git clean -dxf -f ./android/app/build; \
|
||||||
rm -rf android/.gradle \
|
[[ -d android/.gradle ]] && cd android && ./gradlew clean
|
||||||
rm -rf android/build \
|
|
||||||
rm -rf ~/.gradle
|
|
||||||
|
|
||||||
|
|
||||||
android-ports: export FLOWSTORM_PORT ?= 7722
|
|
||||||
android-ports: export TARGET := android-sdk
|
android-ports: export TARGET := android-sdk
|
||||||
android-ports: export RCT_METRO_PORT ?= 8081
|
|
||||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
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:3449 tcp:3449 && \
|
||||||
adb reverse tcp:4567 tcp:4567 && \
|
adb reverse tcp:4567 tcp:4567 && \
|
||||||
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
|
|
||||||
adb forward tcp:5561 tcp:5561
|
adb forward tcp:5561 tcp:5561
|
||||||
|
|
||||||
android-devices: export TARGET := android-sdk
|
android-devices: export TARGET := android-sdk
|
||||||
android-devices: ##@other Invoke adb devices
|
android-devices: ##@other Invoke adb devices
|
||||||
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: export TARGET := android-sdk
|
||||||
android-logcat: ##@other Read status-mobile logs from Android phone using adb
|
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 :'
|
adb logcat | grep -e RNBootstrap -e ReactNativeJS -e ReactNative -e StatusModule -e StatusNativeLogs -e 'F DEBUG :' -e 'Go :' -e 'GoLog :' -e 'libc :'
|
||||||
@@ -479,10 +441,6 @@ _list: SHELL := /bin/sh
|
|||||||
_list:
|
_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 '^$@$$'
|
@$(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
|
# REPLs
|
||||||
#--------------
|
#--------------
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ react {
|
|||||||
/**
|
/**
|
||||||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
||||||
*/
|
*/
|
||||||
def enableProguardInReleaseBuilds = true
|
def enableProguardInReleaseBuilds = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The preferred build flavor of JavaScriptCore (JSC)
|
* The preferred build flavor of JavaScriptCore (JSC)
|
||||||
@@ -83,6 +83,7 @@ def jscFlavor = 'org.webkit:android-jsc:+'
|
|||||||
*/
|
*/
|
||||||
def enableHermes = hermesEnabled.toBoolean();
|
def enableHermes = hermesEnabled.toBoolean();
|
||||||
|
|
||||||
|
|
||||||
def getCommitHash = { ->
|
def getCommitHash = { ->
|
||||||
if (project.hasProperty("commitHash")) {
|
if (project.hasProperty("commitHash")) {
|
||||||
return project.commitHash
|
return project.commitHash
|
||||||
@@ -137,24 +138,11 @@ def getEnvOrConfig = { varName ->
|
|||||||
android {
|
android {
|
||||||
ndkVersion rootProject.ext.ndkVersion
|
ndkVersion rootProject.ext.ndkVersion
|
||||||
|
|
||||||
buildToolsVersion rootProject.ext.buildToolsVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
targetCompatibility JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace "im.status.ethereum"
|
namespace "im.status.ethereum"
|
||||||
@@ -206,12 +194,16 @@ android {
|
|||||||
doNotStrip '*/mips/*.so'
|
doNotStrip '*/mips/*.so'
|
||||||
doNotStrip '*/mips64/*.so'
|
doNotStrip '*/mips64/*.so'
|
||||||
}
|
}
|
||||||
|
dexOptions {
|
||||||
|
jumboMode true
|
||||||
|
javaMaxHeapSize "8g"
|
||||||
|
}
|
||||||
splits {
|
splits {
|
||||||
abi {
|
abi {
|
||||||
reset()
|
reset()
|
||||||
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
|
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
|
||||||
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||||
universalApk false
|
universalApk true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@@ -232,7 +224,6 @@ android {
|
|||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
minifyEnabled enableProguardInReleaseBuilds
|
minifyEnabled enableProguardInReleaseBuilds
|
||||||
shrinkResources enableProguardInReleaseBuilds
|
|
||||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||||
signingConfig null
|
signingConfig null
|
||||||
}
|
}
|
||||||
@@ -240,10 +231,10 @@ android {
|
|||||||
initWith release
|
initWith release
|
||||||
applicationIdSuffix ".pr"
|
applicationIdSuffix ".pr"
|
||||||
versionNameSuffix ".pr"
|
versionNameSuffix ".pr"
|
||||||
debuggable false
|
debuggable false
|
||||||
matchingFallbacks = ["release"]
|
matchingFallbacks = ["release"]
|
||||||
// necessary to make react-native-config's code generation work
|
// necessary to make react-native-config's code generation work
|
||||||
resValue "string", "build_config_package", "im.status.ethereum"
|
resValue "string", "build_config_package", "im.status.ethereum"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,14 +268,11 @@ dependencies {
|
|||||||
// The version of react-native is set by the React Native Gradle Plugin
|
// The version of react-native is set by the React Native Gradle Plugin
|
||||||
implementation("com.facebook.react:react-android")
|
implementation("com.facebook.react:react-android")
|
||||||
implementation("androidx.core:core-splashscreen:1.0.0")
|
implementation("androidx.core:core-splashscreen:1.0.0")
|
||||||
|
// we don't use hermes for debug but we need its pom file for release builds
|
||||||
if (enableHermes) {
|
// https://github.com/status-im/status-mobile/pull/18675
|
||||||
implementation("com.facebook.react:hermes-android")
|
implementation("com.facebook.react:hermes-android")
|
||||||
} else {
|
// FIXME: implementing both hermes & JSC increases bundle size by ~ 2MB
|
||||||
// https://github.com/status-im/status-mobile/issues/18493
|
implementation(jscFlavor)
|
||||||
// we don't use hermes for debug builds because it crashes too often
|
|
||||||
implementation(jscFlavor)
|
|
||||||
}
|
|
||||||
|
|
||||||
// react-native-screens
|
// react-native-screens
|
||||||
implementation("androidx.appcompat:appcompat:1.1.0-rc01")
|
implementation("androidx.appcompat:appcompat:1.1.0-rc01")
|
||||||
@@ -296,9 +284,8 @@ dependencies {
|
|||||||
implementation("com.github.status-im:function:0.0.1")
|
implementation("com.github.status-im:function:0.0.1")
|
||||||
implementation("com.facebook.fresco:fresco:2.5.0")
|
implementation("com.facebook.fresco:fresco:2.5.0")
|
||||||
implementation("com.facebook.fresco:animated-gif:2.5.0")
|
implementation("com.facebook.fresco:animated-gif:2.5.0")
|
||||||
implementation("com.squareup.okhttp3:okhttp-tls:4.11.0")
|
implementation("com.squareup.okhttp3:okhttp-tls:4.9.2")
|
||||||
implementation("com.google.prefab:cli:2.0.0")
|
implementation("com.google.prefab:cli:2.0.0")
|
||||||
implementation("com.android.tools.build:aapt2:8.1.1-10154469")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,6 @@
|
|||||||
-keep interface okhttp3.** { *; }
|
-keep interface okhttp3.** { *; }
|
||||||
-dontwarn okhttp3.**
|
-dontwarn okhttp3.**
|
||||||
|
|
||||||
# to fix : java.security.KeyStoreException: BKS not found
|
|
||||||
-keep class org.bouncycastle.** { *; }
|
|
||||||
|
|
||||||
# okio
|
# okio
|
||||||
|
|
||||||
-keep class sun.misc.Unsafe { *; }
|
-keep class sun.misc.Unsafe { *; }
|
||||||
@@ -78,13 +75,4 @@
|
|||||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||||
**[] $VALUES;
|
**[] $VALUES;
|
||||||
public *;
|
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,11 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
|
<!-- 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. -->
|
<!-- 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"/>
|
<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" >
|
||||||
|
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
|
||||||
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
|
|||||||
@@ -2,16 +2,8 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<queries>
|
|
||||||
<intent>
|
|
||||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
|
||||||
<data android:mimeType="*/*" />
|
|
||||||
</intent>
|
|
||||||
</queries>
|
|
||||||
|
|
||||||
<!-- non-dangerous permissions -->
|
<!-- non-dangerous permissions -->
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<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.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.NFC"/>
|
<uses-permission android:name="android.permission.NFC"/>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
@@ -36,7 +28,6 @@
|
|||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
|
||||||
android:theme="@style/Theme.AppSplash"
|
android:theme="@style/Theme.AppSplash"
|
||||||
android:name=".MainApplication"
|
android:name=".MainApplication"
|
||||||
android:largeHeap="true"
|
android:largeHeap="true"
|
||||||
@@ -71,30 +62,8 @@
|
|||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
<category android:name="android.intent.category.BROWSABLE" />
|
<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="http" android:host="status.app" />
|
||||||
<data android:scheme="https" 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" />
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<intent-filter android:autoVerify="true">
|
<intent-filter android:autoVerify="true">
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
@@ -105,13 +74,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||||
<service
|
<service android:name="im.status.ethereum.pushnotifications.ForegroundService"></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>
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="${applicationId}.provider"
|
android:authorities="${applicationId}.provider"
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsRe
|
|||||||
|
|
||||||
private fun tryToEmit(eventName: String, event: WritableMap) {
|
private fun tryToEmit(eventName: String, event: WritableMap) {
|
||||||
try {
|
try {
|
||||||
(getApplication() as MainApplication).reactNativeHost
|
(getApplication() as MainApplication).getReactNativeHost()
|
||||||
.getReactInstanceManager()
|
.getReactInstanceManager()
|
||||||
.getCurrentReactContext()
|
.getCurrentReactContext()
|
||||||
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|
||||||
|
|||||||
@@ -25,13 +25,14 @@ class MainApplication : NavigationApplication() {
|
|||||||
return BuildConfig.DEBUG
|
return BuildConfig.DEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getPackages(): List<ReactPackage> =
|
override fun getPackages(): List<ReactPackage> {
|
||||||
PackageList(this).packages.apply {
|
val statusPackage = StatusPackage(RootUtil.isDeviceRooted())
|
||||||
// Packages that cannot be autolinked yet can be added manually here
|
val packages = PackageList(this).getPackages()
|
||||||
add(StatusPackage(RootUtil.isDeviceRooted()))
|
packages.add(statusPackage)
|
||||||
add(RNStatusKeycardPackage())
|
packages.add(RNStatusKeycardPackage())
|
||||||
add(PushNotificationPackage())
|
packages.add(PushNotificationPackage())
|
||||||
add(BlurViewPackage())
|
packages.add(BlurViewPackage())
|
||||||
|
return packages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getJSMainModuleName(): String = "index"
|
override fun getJSMainModuleName(): String = "index"
|
||||||
@@ -41,8 +42,9 @@ class MainApplication : NavigationApplication() {
|
|||||||
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
||||||
}
|
}
|
||||||
|
|
||||||
override val reactNativeHost: ReactNativeHost
|
override fun getReactNativeHost(): ReactNativeHost {
|
||||||
get() = mReactNativeHost
|
return mReactNativeHost
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 92 B |
|
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 498 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 266 B After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 972 B |
|
After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 108 B |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 825 B After Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 69 KiB |
@@ -2,5 +2,4 @@
|
|||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@mipmap/ic_background"/>
|
<background android:drawable="@mipmap/ic_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_foreground"/>
|
<foreground android:drawable="@mipmap/ic_foreground"/>
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
</adaptive-icon>
|
||||||
</adaptive-icon>
|
|
||||||
@@ -2,5 +2,4 @@
|
|||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@mipmap/ic_background"/>
|
<background android:drawable="@mipmap/ic_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_foreground"/>
|
<foreground android:drawable="@mipmap/ic_foreground"/>
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome" />
|
</adaptive-icon>
|
||||||
</adaptive-icon>
|
|
||||||
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 374 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 239 B |
|
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 678 B |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 970 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 517 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 905 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 10 KiB |
@@ -15,8 +15,6 @@ ext {
|
|||||||
supportLibVersion = project.supportLibVersion
|
supportLibVersion = project.supportLibVersion
|
||||||
gradlePluginVersion = project.gradlePluginVersion
|
gradlePluginVersion = project.gradlePluginVersion
|
||||||
kotlinVersion = project.kotlinPluginVersion
|
kotlinVersion = project.kotlinPluginVersion
|
||||||
kotlinPluginVersion = project.kotlinPluginVersion
|
|
||||||
kotlinToolsVersion = project.kotlinPluginVersion
|
|
||||||
ndkVersion = "25.2.9519653"
|
ndkVersion = "25.2.9519653"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -30,7 +28,6 @@ buildscript {
|
|||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
|
||||||
classpath("com.android.tools.build:gradle")
|
classpath("com.android.tools.build:gradle")
|
||||||
classpath("com.facebook.react:react-native-gradle-plugin")
|
classpath("com.facebook.react:react-native-gradle-plugin")
|
||||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -44,30 +41,11 @@ subprojects {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
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 {
|
allprojects {
|
||||||
beforeEvaluate {
|
beforeEvaluate {
|
||||||
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
|
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
|
|
||||||
# Version requirements used throughout the Gradle scripts
|
# Version requirements used throughout the Gradle scripts
|
||||||
minSdkVersion=24
|
minSdkVersion=24
|
||||||
compileSdkVersion=34
|
compileSdkVersion=33
|
||||||
targetSdkVersion=34
|
targetSdkVersion=33
|
||||||
buildToolsVersion=34.0.0
|
buildToolsVersion=33.0.0
|
||||||
supportLibVersion=28.0.0
|
supportLibVersion=28.0.0
|
||||||
# This should match version from nix/pkgs/aapt2/default.nix
|
# This should match version from nix/pkgs/aapt2/default.nix
|
||||||
gradlePluginVersion=7.4.2
|
gradlePluginVersion=7.4.2
|
||||||
@@ -38,12 +38,12 @@ KEYSTORE_PASSWORD=password
|
|||||||
KEYSTORE_ALIAS=status
|
KEYSTORE_ALIAS=status
|
||||||
KEYSTORE_KEY_PASSWORD=password
|
KEYSTORE_KEY_PASSWORD=password
|
||||||
|
|
||||||
# Splitting by CPU Architecture produces smaller APKs.
|
# By default we build a mostly universal APK
|
||||||
ANDROID_ABI_SPLIT=true
|
ANDROID_ABI_SPLIT=false
|
||||||
# By default its better to only build apk for most recent devices.
|
# Some platforms are excluded though
|
||||||
ANDROID_ABI_INCLUDE=arm64-v8a
|
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86;x86_64
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx8704M -XX:+UseParallelGC
|
org.gradle.jvmargs=-Xmx8704M
|
||||||
|
|
||||||
versionCode=9999
|
versionCode=9999
|
||||||
commitHash=unknown
|
commitHash=unknown
|
||||||
|
|||||||
@@ -1,4 +1,22 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ['module:@react-native/babel-preset'],
|
presets: [
|
||||||
plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
|
"@babel/preset-env"
|
||||||
|
// 'module:metro-react-native-babel-preset'
|
||||||
|
],
|
||||||
|
/*plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
|
||||||
|
env: {
|
||||||
|
test: {
|
||||||
|
presets: [
|
||||||
|
'@babel/preset-react',
|
||||||
|
[
|
||||||
|
'@babel/preset-env',
|
||||||
|
{
|
||||||
|
targets: {
|
||||||
|
node: 'current',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},*/
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
/* Options section can't access functions in objects. */
|
/* Options section can't access functions in objects. */
|
||||||
def isPRBuild = utils.isPRBuild()
|
def isPRBuild = utils.isPRBuild()
|
||||||
@@ -34,10 +34,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
LANG = 'en_US.UTF-8'
|
LANG = "en_US.UTF-8"
|
||||||
LC_ALL = 'en_US.UTF-8'
|
LC_ALL = "en_US.UTF-8"
|
||||||
LANGUAGE = 'en_US.UTF-8'
|
LANGUAGE = "en_US.UTF-8"
|
||||||
PLATFORM = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
TARGET = "android${utils.isE2EBuild() ? "-e2e" : ""}"
|
||||||
BUILD_ENV = 'prod'
|
BUILD_ENV = 'prod'
|
||||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||||
FASTLANE_DISABLE_COLORS = 1
|
FASTLANE_DISABLE_COLORS = 1
|
||||||
@@ -71,8 +71,12 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('Upload') {
|
stage('Upload') {
|
||||||
steps { script {
|
steps { script {
|
||||||
def urls = apks.collect { s5cmd.upload(it) }
|
def urls = apks.collect { s3.uploadArtifact(it) }
|
||||||
env.PKG_URL = urls.first()
|
if (urls.size() > 1) { /* Return only the universal APK. */
|
||||||
|
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)
|
jenkins.setBuildDesc(APK: env.PKG_URL)
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
import groovy.json.JsonBuilder
|
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
@@ -74,7 +72,7 @@ pipeline {
|
|||||||
iOS: utils.pkgUrl(ios),
|
iOS: utils.pkgUrl(ios),
|
||||||
Diawi: utils.getEnv(ios, 'DIAWI_URL'),
|
Diawi: utils.getEnv(ios, 'DIAWI_URL'),
|
||||||
/* upload the sha256 checksums file too */
|
/* upload the sha256 checksums file too */
|
||||||
SHA: s5cmd.upload(sha),
|
SHA: s3.uploadArtifact(sha),
|
||||||
]
|
]
|
||||||
/* add URLs to the build description */
|
/* add URLs to the build description */
|
||||||
jenkins.setBuildDesc(urls)
|
jenkins.setBuildDesc(urls)
|
||||||
@@ -83,9 +81,9 @@ pipeline {
|
|||||||
stage('Publish') {
|
stage('Publish') {
|
||||||
when { expression { params.PUBLISH } }
|
when { expression { params.PUBLISH } }
|
||||||
steps { script {
|
steps { script {
|
||||||
switch (utils.getBuildType()) {
|
switch (btype) {
|
||||||
case 'nightly': /* Create JSON file with newest build URLs */
|
case 'nightly': /* Create JSON file with newest build URLs */
|
||||||
updateBucketJSON(urls, 'latest.json');
|
s3.updateBucketJSON(urls, 'latest.json');
|
||||||
break;
|
break;
|
||||||
case 'release':
|
case 'release':
|
||||||
github.publishReleaseFiles(repo: 'status-mobile');
|
github.publishReleaseFiles(repo: 'status-mobile');
|
||||||
@@ -116,22 +114,3 @@ def Boolean getPublishDefault(Boolean previousValue) {
|
|||||||
if (previousValue != null) { return previousValue }
|
if (previousValue != null) { return previousValue }
|
||||||
return false
|
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,12 +1,12 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
||||||
triggers {
|
triggers {
|
||||||
// Nightly at 0am
|
// Nightly at 2am
|
||||||
cron 'H 0 * * *'
|
cron 'H 2 * * *'
|
||||||
}
|
}
|
||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
/* Options section can't access functions in objects. */
|
/* Options section can't access functions in objects. */
|
||||||
def isPRBuild = utils.isPRBuild()
|
def isPRBuild = utils.isPRBuild()
|
||||||
@@ -34,10 +34,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
LANG = 'en_US.UTF-8'
|
LANG = "en_US.UTF-8"
|
||||||
LC_ALL = 'en_US.UTF-8'
|
LC_ALL = "en_US.UTF-8"
|
||||||
LANGUAGE = 'en_US.UTF-8'
|
LANGUAGE = "en_US.UTF-8"
|
||||||
PLATFORM = 'ios'
|
TARGET = 'ios'
|
||||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||||
FASTLANE_DISABLE_COLORS = 1
|
FASTLANE_DISABLE_COLORS = 1
|
||||||
BUNDLE_PATH = "${HOME}/.bundle"
|
BUNDLE_PATH = "${HOME}/.bundle"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
/* Options section can't access functions in objects. */
|
/* Options section can't access functions in objects. */
|
||||||
def isPRBuild = utils.isPRBuild()
|
def isPRBuild = utils.isPRBuild()
|
||||||
@@ -29,53 +29,67 @@ pipeline {
|
|||||||
description: 'Specify build type. Values: pr / e2e / nightly / release',
|
description: 'Specify build type. Values: pr / e2e / nightly / release',
|
||||||
defaultValue: 'pr',
|
defaultValue: 'pr',
|
||||||
)
|
)
|
||||||
booleanParam(
|
|
||||||
name: 'RUN_CONTRACT_TESTS',
|
|
||||||
description: 'Whether to run optional and slow contract tests.',
|
|
||||||
defaultValue: false,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
LANG = 'en_US.UTF-8'
|
LANG = "en_US.UTF-8"
|
||||||
LC_ALL = 'en_US.UTF-8'
|
LC_ALL = "en_US.UTF-8"
|
||||||
LANGUAGE = 'en_US.UTF-8'
|
LANGUAGE = "en_US.UTF-8"
|
||||||
PLATFORM = 'tests'
|
TARGET = 'tests'
|
||||||
BUILD_ENV = 'prod'
|
BUILD_ENV = 'prod'
|
||||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||||
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
|
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
|
||||||
CLJ_LINTER_PRINT_WARNINGS = 'true'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Test') {
|
stage('Checks') {
|
||||||
parallel {
|
parallel {
|
||||||
stage('Lint') {
|
stage('Lint') {
|
||||||
steps { make('lint') }
|
steps {
|
||||||
|
sh """#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
make lint CLJ_LINTER_PRINT_WARNINGS=true 2>&1 | tee ${LOG_FILE}
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
stage('Unit') {
|
stage('Unit Tests') {
|
||||||
steps { make('test-unit') }
|
steps {
|
||||||
}
|
sh """#!/bin/bash
|
||||||
stage('Component') {
|
set -eo pipefail
|
||||||
steps { make('test-component') }
|
make test-unit 2>&1 | tee -a ${LOG_FILE}
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Heavy Test') {
|
stage('Contract Tests') {
|
||||||
parallel {
|
steps {
|
||||||
stage('Contract') {
|
sh """#!/bin/bash
|
||||||
when { expression { params.RUN_CONTRACT_TESTS } }
|
set -eo pipefail
|
||||||
steps { make('test-contract') }
|
make test-contract 2>&1 | tee -a ${LOG_FILE}
|
||||||
}
|
"""
|
||||||
stage('Integration') {
|
}
|
||||||
steps { make('test-integration') }
|
}
|
||||||
}
|
stage('Integration Tests') {
|
||||||
|
steps {
|
||||||
|
sh """#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
make test-integration 2>&1 | tee -a ${LOG_FILE}
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Component Tests') {
|
||||||
|
steps {
|
||||||
|
sh """#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
make component-test 2>&1 | tee -a ${LOG_FILE}
|
||||||
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Upload') {
|
stage('Upload') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
env.PKG_URL = s5cmd.upload(LOG_FILE)
|
env.PKG_URL = s3.uploadArtifact(LOG_FILE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,10 +100,3 @@ pipeline {
|
|||||||
always { sh 'make purge' }
|
always { sh 'make purge' }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def make(target) {
|
|
||||||
sh """#!/bin/bash
|
|
||||||
set -eo pipefail
|
|
||||||
make ${target} 2>&1 | tee -a ${LOG_FILE}
|
|
||||||
"""
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
@@ -36,12 +36,6 @@ pipeline {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
|
||||||
/* Avoid race conditions with other builds using virtualenv. */
|
|
||||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
|
||||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Fetch') {
|
stage('Fetch') {
|
||||||
steps { script {
|
steps { script {
|
||||||
@@ -58,8 +52,7 @@ pipeline {
|
|||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps { script {
|
steps { script {
|
||||||
dir('test/appium') {
|
dir('test/appium') {
|
||||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
sh 'pip3 install --user -r requirements.txt'
|
||||||
sh 'pip3 install -r requirements.txt'
|
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
@@ -99,7 +92,7 @@ pipeline {
|
|||||||
--rerun_count=2 \
|
--rerun_count=2 \
|
||||||
--testrail_report=True \
|
--testrail_report=True \
|
||||||
-m testrail_id \
|
-m testrail_id \
|
||||||
-m \"nightly\" \
|
-m \"new_ui_critical or new_ui_medium\" \
|
||||||
-k \"${params.KEYWORD_EXPRESSION}\" \
|
-k \"${params.KEYWORD_EXPRESSION}\" \
|
||||||
--apk=${params.APK_URL ?: apk_path}
|
--apk=${params.APK_URL ?: apk_path}
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
@@ -35,11 +35,13 @@ pipeline {
|
|||||||
description: 'OBSOLETE ARGUMENT TO BE REMOVED',
|
description: 'OBSOLETE ARGUMENT TO BE REMOVED',
|
||||||
defaultValue: 'DUMMY',
|
defaultValue: 'DUMMY',
|
||||||
)
|
)
|
||||||
|
/* Commented to use TEST_MARKERS values from job params
|
||||||
string(
|
string(
|
||||||
name: 'TEST_MARKERS',
|
name: 'TEST_MARKERS',
|
||||||
description: 'Marker expression for matching tests to run.',
|
description: 'Marker expression for matching tests to run.',
|
||||||
defaultValue: 'smoke',
|
defaultValue: 'new_ui_critical',
|
||||||
)
|
)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
@@ -52,12 +54,6 @@ pipeline {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
|
||||||
/* Avoid race conditions with other builds using virtualenv. */
|
|
||||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
|
||||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Prep') {
|
stage('Prep') {
|
||||||
steps { script {
|
steps { script {
|
||||||
@@ -83,8 +79,7 @@ pipeline {
|
|||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps { script {
|
steps { script {
|
||||||
dir('test/appium') {
|
dir('test/appium') {
|
||||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
sh 'pip3 install --user -r requirements.txt'
|
||||||
sh 'pip3 install -r requirements.txt'
|
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
@@ -35,11 +35,6 @@ pipeline {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
|
||||||
/* Avoid race conditions with other builds using virtualenv. */
|
|
||||||
VIRTUAL_ENV = "${WORKSPACE_TMP}/venv"
|
|
||||||
PATH = "${VIRTUAL_ENV}/bin:${PATH}"
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Prep') {
|
stage('Prep') {
|
||||||
@@ -56,8 +51,7 @@ pipeline {
|
|||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps { script {
|
steps { script {
|
||||||
dir('test/appium') {
|
dir('test/appium') {
|
||||||
sh "python3 -m venv ${VIRTUAL_ENV}"
|
sh 'pip3 install --user -r requirements.txt'
|
||||||
sh 'pip3 install -r requirements.txt'
|
|
||||||
}
|
}
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'macos' }
|
agent { label 'macos' }
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
LANG = 'en_US.UTF-8'
|
LANG = 'en_US.UTF-8'
|
||||||
LANGUAGE = 'en_US.UTF-8'
|
LANGUAGE = 'en_US.UTF-8'
|
||||||
LC_ALL = 'en_US.UTF-8'
|
LC_ALL = 'en_US.UTF-8'
|
||||||
PLATFORM = 'ios'
|
TARGET = 'ios'
|
||||||
FASTLANE_DISABLE_COLORS = 1
|
FASTLANE_DISABLE_COLORS = 1
|
||||||
/* avoid writing to r/o /nix */
|
/* avoid writing to r/o /nix */
|
||||||
GEM_HOME = '~/.rubygems'
|
GEM_HOME = '~/.rubygems'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label params.AGENT_LABEL }
|
agent { label params.AGENT_LABEL }
|
||||||
@@ -123,6 +123,7 @@ pipeline {
|
|||||||
post {
|
post {
|
||||||
always { script {
|
always { script {
|
||||||
nix.shell('nix-store --optimize', pure: false)
|
nix.shell('nix-store --optimize', pure: false)
|
||||||
|
nix.shell('nix/scripts/clean.sh', pure: false)
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'linux' }
|
agent { label 'linux' }
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
LANG = 'en_US.UTF-8'
|
LANG = 'en_US.UTF-8'
|
||||||
LANGUAGE = 'en_US.UTF-8'
|
LANGUAGE = 'en_US.UTF-8'
|
||||||
LC_ALL = 'en_US.UTF-8'
|
LC_ALL = 'en_US.UTF-8'
|
||||||
PLATFORM = 'ios'
|
TARGET = 'ios'
|
||||||
FASTLANE_DISABLE_COLORS = 1
|
FASTLANE_DISABLE_COLORS = 1
|
||||||
/* avoid writing to r/o /nix */
|
/* avoid writing to r/o /nix */
|
||||||
GEM_HOME = '~/.rubygems'
|
GEM_HOME = '~/.rubygems'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
library 'status-jenkins-lib@v1.9.8'
|
library 'status-jenkins-lib@v1.8.7'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
|
|||||||
@@ -1,43 +1,67 @@
|
|||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
[Starting Guide](starting-guide.md)
|
||||||
|
|
||||||
|
[IDE Setup](ide-setup.md)
|
||||||
|
|
||||||
|
|
||||||
- [Starting Guide](starting-guide.md)
|
|
||||||
- [IDE Setup](ide-setup.md)
|
|
||||||
|
|
||||||
## Development Process
|
## Development Process
|
||||||
|
|
||||||
- [Coding guidelines](new-guidelines.md)
|
[Coding guidelines](new-guidelines.md)
|
||||||
- [UI components coding guidelines](ui-guidelines.md)
|
|
||||||
- [Release Checklist](release-checklist.md)
|
[UI components coding guidelines](ui-guidelines.md)
|
||||||
- [Release Guide](release-guide.md)
|
|
||||||
- [Merging PR process](merging-pr-process.md)
|
[Release Checklist](release-checklist.md)
|
||||||
- [PR Review Policy](pr-review-policy.md)
|
|
||||||
- [Working on PR together with QA team](pipeline_process.md)
|
[Release Guide](release-guide.md)
|
||||||
- [Debugging](debugging.md)
|
|
||||||
- [Patching](patching.md)
|
[Merging PR process](merging-pr-process.md)
|
||||||
- [Creating a pixel perfect UI](pixel-perfection.md)
|
|
||||||
- [Contributing to status-go](status-go-changes.md)
|
[PR Review Policy](pr-review-policy.md)
|
||||||
- [Malli schemas (recorded demo)](https://www.youtube.com/watch?v=SlRio70aYVI) ([slides](files/forging-code-with-schemas-sep-2023-slides.pdf))
|
|
||||||
|
[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
|
## Testing
|
||||||
|
|
||||||
- [Overview](tests/tests-overview.md)
|
[How to run local tests](testing.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)
|
[End-to-end tests (e2e) overview](how-to-launch-e2e.md)
|
||||||
- [Component tests (jest) overview](tests/component-tests-overview.md)
|
|
||||||
|
[Component tests (jest) overview](component-tests-overview.md)
|
||||||
|
|
||||||
|
|
||||||
## Project details
|
## Project details
|
||||||
|
|
||||||
- [status-go introduction (recorded meeting)](https://drive.google.com/file/d/1B7TljmTZ8fHkqJH8ChU1Cp4FGDFM03gq/view)
|
[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)
|
[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
|
## Misc
|
||||||
|
|
||||||
- [Importing icons from Figma into project](export-icons.md)
|
[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)
|
[Updating Status APK builds for the F-Droid Android application catalogue](fdroid.md)
|
||||||
|
|
||||||
|
[Troubleshooting for known errors](troubleshooting.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Outdated:
|
## Outdated:
|
||||||
|
|
||||||
- [Old guidelines](codebase-structure-and-guidelines.md)
|
[Old guidelines](codebase-structure-and-guidelines.md)
|
||||||
- [Post mortem analysis](post-mortem.md)
|
|
||||||
|
[Post mortem analysis](post-mortem.md)
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ Both of these links are showing it for React-Testing-Library (not Native) howeve
|
|||||||
## Running the tests
|
## Running the tests
|
||||||
To run these tests there are two methods.
|
To run these tests there are two methods.
|
||||||
|
|
||||||
`make test-component`
|
`make component-test`
|
||||||
setups and runs the test suite once.
|
setups and runs the test suite once.
|
||||||
|
|
||||||
`make test-component-watch`
|
`make component-test-watch`
|
||||||
setups and runs the test suite and watches for code changes will then retrigger the test suite.
|
setups and runs the test suite and watches for code changes will then retrigger the test suite.
|
||||||
|
|
||||||
## Writing Tests
|
## Writing Tests
|
||||||
@@ -38,7 +38,7 @@ There is a file of utility functions defined in "src/test_helpers/component.cljs
|
|||||||
## Configuration
|
## Configuration
|
||||||
Status Mobile has a bespoke tech stack, as such there is more complexities to configuring the tests.
|
Status Mobile has a bespoke tech stack, as such there is more complexities to configuring the tests.
|
||||||
|
|
||||||
### Shadow-CLJS
|
### Shadow-CLJS
|
||||||
the configuration for compiling our tests are defined in the "shadow-cljs.edn" file.
|
the configuration for compiling our tests are defined in the "shadow-cljs.edn" file.
|
||||||
The three main parts of this are
|
The three main parts of this are
|
||||||
`:target :npm-module`
|
`:target :npm-module`
|
||||||
@@ -47,9 +47,9 @@ Needed for the configuration we are using
|
|||||||
a vector of entry points for the test files.
|
a vector of entry points for the test files.
|
||||||
and the `ns-regexp` to specify what tests to find. Since we have multiple forms of tests we decided that "component-spec" is the least likely to detect the wrong file type.
|
and the `ns-regexp` to specify what tests to find. Since we have multiple forms of tests we decided that "component-spec" is the least likely to detect the wrong file type.
|
||||||
|
|
||||||
It's worth knowing that our tests are compiled to JS and then run in the temporary folder `component-tests`.
|
It's worth knowing that our tests are compiled to JS and then run in the temporary folder `component-tests`.
|
||||||
|
|
||||||
### Jest
|
### Jest
|
||||||
There is also further configuration for Jest in "test/jest". There is a jest config file which has some mostly standard configuration pieces, where the tests live, what environment variables are set etc. This is documented by Jest here: https://jestjs.io/docs/configuration
|
There is also further configuration for Jest in "test/jest". There is a jest config file which has some mostly standard configuration pieces, where the tests live, what environment variables are set etc. This is documented by Jest here: https://jestjs.io/docs/configuration
|
||||||
|
|
||||||
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies.
|
There is also a setup file which is used to set some global and default values. Additionally this file is used to mock some of the react native (among other) dependencies
|
||||||
@@ -20,39 +20,6 @@ A server will be started at http://localhost:4567. It might show "not connected"
|
|||||||
|
|
||||||
More details about re-frisk are on the [project page](https://github.com/flexsurfer/re-frisk).
|
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
|
## 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:
|
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,12 @@ required by bignumber.js otherwise there is a compilation error
|
|||||||
|
|
||||||
used to generate guids and random values in `status-im.utils.random`
|
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"
|
## "emojilib": "^2.4.0"
|
||||||
|
|
||||||
used for emojis
|
used for emojis
|
||||||
@@ -107,6 +113,11 @@ used for profile picture
|
|||||||
used for storing password when user saves password
|
used for storing password when user saves password
|
||||||
TODO: check if fork is necessary, merge with upstream?
|
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"
|
## "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
|
used to send email to support when phone is shaked
|
||||||
@@ -120,7 +131,6 @@ TODO: update once bug is fixed for Android that causes crash when app is back fr
|
|||||||
## "react-native-shake": "^3.3.1"
|
## "react-native-shake": "^3.3.1"
|
||||||
|
|
||||||
used to send email to support when phone is shaked
|
used to send email to support when phone is shaked
|
||||||
|
|
||||||
## "react-native-lottie-splash-screen": "^1.0.1"
|
## "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
|
used to make splash screen with lottie animation during initial loading for android, also used as replacement of "react-native-splash-screen" for iOS
|
||||||
@@ -147,10 +157,10 @@ used for browser
|
|||||||
used for native navigation
|
used for native navigation
|
||||||
fixed because even bugfix version upgrade causes runtime errors with current version of react-native
|
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"
|
## "react-native-draggable-flatlist": "https://github.com/computerjazz/react-native-draggable-flatlist"
|
||||||
|
|
||||||
A drag-and-drop-enabled FlatList component for React Native
|
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
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ As a part of CI for Status mobile app and in order to ensure there are no regres
|
|||||||
- Automated tests written on Python 3.9 and pytest.
|
- Automated tests written on Python 3.9 and pytest.
|
||||||
- Appium (server) and Selenium WebDriver (protocol) are the base of test automation framework.
|
- Appium (server) and Selenium WebDriver (protocol) are the base of test automation framework.
|
||||||
|
|
||||||
TestRail is a test case management system tool where we have test cases.
|
TestRail is a test case management system tool where we have test cases.
|
||||||
|
|
||||||
|
|
||||||
Each of the test case gets a priority (Critical/High/Medium)
|
Each of the test case gets a priority (Critical/High/Medium)
|
||||||
@@ -20,21 +20,21 @@ For now we support e2e for Android only.
|
|||||||
Whenever we need to push set of test scripts we create 16 parallel sessions (max, but depending on amount of cases that are included in job) and each thread: 1) uploads Android .apk file to SauceLabs -> 2) runs through the test steps -> 3) receives results whether test failed on particular step or succeeded with no errors -> 3) Parse test results and push them as a Github comment (if the suite ran against respective PR) and into TestRail.
|
Whenever we need to push set of test scripts we create 16 parallel sessions (max, but depending on amount of cases that are included in job) and each thread: 1) uploads Android .apk file to SauceLabs -> 2) runs through the test steps -> 3) receives results whether test failed on particular step or succeeded with no errors -> 3) Parse test results and push them as a Github comment (if the suite ran against respective PR) and into TestRail.
|
||||||
|
|
||||||
We push **whole automation test suite (currently 155, amount is changing)** against each nightly build (if the nightly builds job succeeded). Results of the test run are saved in TestRail.
|
We push **whole automation test suite (currently 155, amount is changing)** against each nightly build (if the nightly builds job succeeded). Results of the test run are saved in TestRail.
|
||||||
And also we push set of autotests whenever PR with successful builds got moved in to `E2E Tests` column from [Pipeline for QA dashboard ](https://github.com/status-im/status-react/projects/7).
|
And also we push set of autotests whenever PR with successful builds got moved in to `E2E Tests` column from [Pipeline for QA dashboard ](https://github.com/status-im/status-react/projects/7).
|
||||||
In that case we save results in TestRail as well and push a comment with test results in a respective PR.
|
In that case we save results in TestRail as well and push a comment with test results in a respective PR.
|
||||||
|
|
||||||
For example: https://github.com/status-im/status-react/pull/9147#issuecomment-540008770
|
For example: https://github.com/status-im/status-react/pull/9147#issuecomment-540008770
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
The test_send_stt_from_wallet opens link in TestRail https://ethstatus.testrail.net/index.php?/tests/view/890885 where performed steps could be found
|
The test_send_stt_from_wallet opens link in TestRail https://ethstatus.testrail.net/index.php?/tests/view/890885 where performed steps could be found
|
||||||
List of all runs performed by test jobs could be found here https://ethstatus.testrail.net/index.php?/runs/overview/14
|
List of all runs performed by test jobs could be found here https://ethstatus.testrail.net/index.php?/runs/overview/14
|
||||||
|
|
||||||
**For credentials for TestRail to see results ping Chu in DM**:
|
**For credentials for TestRail to see results ping Chu in DM**:
|
||||||
|
|
||||||
Opening any test run navigates you to list of test cases with results:
|
Opening any test run navigates you to list of test cases with results:
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## What about launching e2e manually
|
## What about launching e2e manually
|
||||||
@@ -53,12 +53,12 @@ Params to specify:
|
|||||||
- test_marks: tests by priorities (by default: `critical or high or medium`, which corresponds the whole suite; to launch the same suite as in PRs, use `critical or high`)
|
- test_marks: tests by priorities (by default: `critical or high or medium`, which corresponds the whole suite; to launch the same suite as in PRs, use `critical or high`)
|
||||||
- testrail_case_id: here is the list of test cases which you may find in test rail (4-digit value)
|
- testrail_case_id: here is the list of test cases which you may find in test rail (4-digit value)
|
||||||
|
|
||||||
For easier access you can hit `Rerun tests` in GH comment and testrail_case_id/ apk_name/ pr_id will be filled automatically. For making sure that tests are being rerun on most recent e2e build it is recommended to paste link to the last e2e build in apk_name field. The list of PR builds can be found in Jenkins Builds block on PR page.
|
For easier access you can hit `Rerun tests` in GH comment and testrail_case_id/ apk_name/ pr_id will be filled automatically. For making sure that tests are being rerun on most recent e2e build it is recommended to paste link to the last e2e build in apk_name field. The list of PR builds can be found in Jenkins Builds block on PR page.
|
||||||

|

|
||||||
And then hit ‘Build’.
|
And then hit ‘Build’.
|
||||||
Once the job starts it picks up specified tests, runs them against provided apk and sends results to pull request.
|
Once the job starts it picks up specified tests, runs them against provided apk and sends results to pull request.
|
||||||
|
|
||||||
Even we have 16 parallel sessions for testing it’s a time consuming operation (whole test suite we have automated at the moment takes ~140 minutes to finish).
|
Even we have 16 parallel sessions for testing it’s a time consuming operation (whole test suite we have automated at the moment takes ~140 minutes to finish).
|
||||||
So for PRs we pick only set of `critical or high` (you can also use this in TEST_MARKS param for job)
|
So for PRs we pick only set of `critical or high` (you can also use this in TEST_MARKS param for job)
|
||||||
tests (otherwise some PRs could wait their turn of the scheduled Jenkins job till the next day).
|
tests (otherwise some PRs could wait their turn of the scheduled Jenkins job till the next day).
|
||||||
|
|
||||||
@@ -78,9 +78,9 @@ Several examples of when test fails to succeed:
|
|||||||
|
|
||||||
- **Valid issue in the automated test scripts** - that's what we're looking for
|
- **Valid issue in the automated test scripts** - that's what we're looking for
|
||||||
|
|
||||||
Example: here is the test results https://github.com/status-im/status-react/pull/13015#issuecomment-1016495043 where one test failed.
|
Example: here is the test results https://github.com/status-im/status-react/pull/13015#issuecomment-1016495043 where one test failed.
|
||||||
1. Open the test in TestRail and open session recorded for this test in SauceLabs
|
1. Open the test in TestRail and open session recorded for this test in SauceLabs
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
In TestRail you may find all the steps performed by the test.
|
In TestRail you may find all the steps performed by the test.
|
||||||
@@ -98,6 +98,6 @@ Not all features of the app could be covered by e2e at the moment:
|
|||||||
## Brief flow for test to be automated
|
## Brief flow for test to be automated
|
||||||
|
|
||||||
Whenever there is a need to have a new test:
|
Whenever there is a need to have a new test:
|
||||||
1) Create a test scenario in TestRail.
|
1) Create a test scenario in TestRail.
|
||||||
2) If certain item could be checked in scope of existing test case we update existing one (otherwise we may have thousands of test cases which is overkill to manage in TestRail as well as in automated test scripts). And also complex autotests increase probability to not catch regressions by stopping test execution (due to valid bug or changed feature) keeping the rest test steps uncovered. So here we need to balance when it makes sense to update existing test case with more checks.
|
2) If certain item could be checked in scope of existing test case we update existing one (otherwise we may have thousands of test cases which is overkill to manage in TestRail as well as in automated test scripts). And also complex autotests increase probability to not catch regressions by stopping test execution (due to valid bug or changed feature) keeping the rest test steps uncovered. So here we need to balance when it makes sense to update existing test case with more checks.
|
||||||
3) Then we create test script based on the test case, ensure test passes for the build and pushing the changes to repo.
|
3) Then we create test script based on the test case, ensure test passes for the build and pushing the changes to repo.
|
||||||
@@ -32,16 +32,14 @@ status-mobile code that makes it to the `develop` branch, should always point to
|
|||||||
In practice, this means that sometimes they need to be merged in lockstep.
|
In practice, this means that sometimes they need to be merged in lockstep.
|
||||||
1) Create a PR in status-go and status-mobile. Update the status-go version to the PR revision `scripts/update-status-go.sh $git_revision`.
|
1) Create a PR in status-go and status-mobile. Update the status-go version to the PR revision `scripts/update-status-go.sh $git_revision`.
|
||||||
2) Get both PRs reviewed and approved. Once status-mobile PR has been approved, go through manual QA testing if necessary. Don't merge status-mobile PR just yet.
|
2) Get both PRs reviewed and approved. Once status-mobile PR has been approved, go through manual QA testing if necessary. Don't merge status-mobile PR just yet.
|
||||||
3) Now that you know the integration between client & server is working, merge the status-go PR first.
|
3) Now that you know the integration between client & server is working, bump the `VERSION` in status-go and merge it.
|
||||||
4) Once merged, tag the merged commit with the new version and push the tag:
|
4) Once merged, tag the version with the new version and push the tag:
|
||||||
```
|
```
|
||||||
git checkout develop
|
git checkout develop
|
||||||
git pull develop
|
git pull develop
|
||||||
make tag-version
|
git tag vx.y.z
|
||||||
git push origin vx.y.z
|
git push origin vx.y.z
|
||||||
```
|
```
|
||||||
:warning: If a specific commit need to tagged in status-go, use `make tag-version TARGET_COMMIT={hash}`. More info about tagging in [status-go](https://github.com/status-im/status-go/blob/develop/RELEASING.md#tagging-versions).
|
|
||||||
|
|
||||||
5) Update status-mobile with the new status-go version, using the new tag `scripts/update-status-go.sh "vx.y.z"`
|
5) Update status-mobile with the new status-go version, using the new tag `scripts/update-status-go.sh "vx.y.z"`
|
||||||
6) If you had to rebase status-go to include new changes, e2e test MUST be re-run. If there's any issue you will
|
6) If you had to rebase status-go to include new changes, e2e test MUST be re-run. If there's any issue you will
|
||||||
have to fix in status-go with another PR and follow the same process.
|
have to fix in status-go with another PR and follow the same process.
|
||||||
|
|||||||