Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9335d0b8e |
@@ -1,6 +0,0 @@
|
||||
{:lint-as {status-im.utils.views/defview clojure.core/defn
|
||||
status-im.utils.views/letsubs clojure.core/let
|
||||
status-im.utils.fx/defn clojure.core/defn
|
||||
status-im.utils.styles/def clojure.core/def
|
||||
status-im.utils.styles/defn clojure.core/defn}
|
||||
:linters {:invalid-arity {:skip-args [status-im.utils.fx/defn]}}}
|
||||
@@ -1,22 +0,0 @@
|
||||
# https://dependabot.com/docs/config-file/
|
||||
|
||||
version: 1
|
||||
update_configs:
|
||||
# Keep build.gradle files up to date, batching pull requests weekly
|
||||
- package_manager: "java:gradle"
|
||||
directory: "/android"
|
||||
update_schedule: "weekly"
|
||||
default_reviewers:
|
||||
- "jakubgs"
|
||||
allowed_updates:
|
||||
- match:
|
||||
update_type: "security"
|
||||
# Keep /mobile/js_files/yarn.lock up to date, batching pull requests weekly
|
||||
- package_manager: "javascript"
|
||||
directory: "/mobile/js_files"
|
||||
update_schedule: "weekly"
|
||||
allowed_updates:
|
||||
- match:
|
||||
update_type: security
|
||||
default_reviewers:
|
||||
- "jakubgs"
|
||||
@@ -1,107 +0,0 @@
|
||||
|
||||
.dockerignore
|
||||
docker-build
|
||||
env/dev/env/config.cljs
|
||||
modules/react-native-status/android/build
|
||||
|
||||
|
||||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
.projectile
|
||||
.cljs_rhino_repl/
|
||||
.#*
|
||||
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
project.xcworkspace
|
||||
|
||||
# Android/IJ
|
||||
#
|
||||
.idea
|
||||
.gradle
|
||||
*.iml
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
android/app/libs
|
||||
android/app/obj
|
||||
android/app/build
|
||||
android/build
|
||||
android/keystores/debug.keystore
|
||||
|
||||
# Generated by clj-rn
|
||||
#
|
||||
index.android.js
|
||||
index.ios.js
|
||||
target/
|
||||
env/dev/env/config.cljs
|
||||
externs/
|
||||
shim.js
|
||||
|
||||
# Generated by lein voom
|
||||
#
|
||||
/pom.xml
|
||||
|
||||
|
||||
# Figwheel
|
||||
#
|
||||
figwheel_server.log
|
||||
.nrepl-port
|
||||
|
||||
# Lein
|
||||
#
|
||||
.lein-failures
|
||||
.lein-repl-history
|
||||
|
||||
## Doo
|
||||
#
|
||||
out
|
||||
doo-index.html
|
||||
|
||||
# Status
|
||||
Statusgo.framework
|
||||
status-dev-cli
|
||||
|
||||
#ios
|
||||
ios/Pods
|
||||
ios/StatusIm.xcworkspace
|
||||
.ruby-version
|
||||
|
||||
#python
|
||||
*.pyc
|
||||
*.cache
|
||||
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
*/fastlane/report.xml
|
||||
*/fastlane/Preview.html
|
||||
*/fastlane/screenshots
|
||||
@@ -1,24 +1 @@
|
||||
CACHED_WEBVIEWS_ENABLED=1
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
DEV_BUILD=1
|
||||
ERC20_CONTRACT_WARNINGS=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
STATUS_GO_PROTOCOL=0
|
||||
STATUS_GO_ENABLE_NIMBUS=0
|
||||
TESTFAIRY_ENABLED=0
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=testnet_rpc
|
||||
ERC20_CONTRACT_WARNINGS=1
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
PAIRING_POPUP_DISABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
STICKERS_ENABLED=1
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
BLANK_PREVIEW=0
|
||||
TOOLTIP_EVENTS=1
|
||||
COMMANDS_ENABLED=1
|
||||
@@ -1,23 +1 @@
|
||||
CACHED_WEBVIEWS_ENABLED=1
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ERC20_CONTRACT_WARNINGS=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
STATUS_GO_ENABLE_NIMBUS=0
|
||||
TESTFAIRY_ENABLED=1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
DEBUG_WEBVIEW=1
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ERC20_CONTRACT_WARNINGS=0
|
||||
ETHEREUM_DEV_CLUSTER=1
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=0
|
||||
PARTITIONED_TOPIC=0
|
||||
CONTRACT_NODES=1
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
HARDWALLET_ENABLED=1
|
||||
@@ -1,20 +0,0 @@
|
||||
DEBUG_WEBVIEW=0
|
||||
DEFAULT_NETWORK=mainnet_rpc
|
||||
ERC20_CONTRACT_WARNINGS=0
|
||||
ETHEREUM_DEV_CLUSTER=0
|
||||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=0
|
||||
LOG_LEVEL_STATUS_GO=
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=0
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
SNOOPY=0
|
||||
RPC_NETWORKS_ONLY=1
|
||||
PARTITIONED_TOPIC=0
|
||||
MOBILE_UI_FOR_DESKTOP=1
|
||||
LOCAL_NOTIFICATIONS=0
|
||||
@@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
||||
@@ -20,78 +20,39 @@
|
||||
|
||||
# Ignore duplicate module providers
|
||||
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
|
||||
node_modules/react-native/Libraries/react-native/React.js
|
||||
.*/Libraries/react-native/React.js
|
||||
.*/Libraries/react-native/ReactNative.js
|
||||
.*/node_modules/jest-runtime/build/__tests__/.*
|
||||
|
||||
; Ignore polyfills
|
||||
node_modules/react-native/Libraries/polyfills/.*
|
||||
|
||||
; These should not be required directly
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
node_modules/warning/.*
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
node_modules/react-native/flow/
|
||||
node_modules/react-native/flow
|
||||
flow/
|
||||
|
||||
[options]
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
module.system=haste
|
||||
|
||||
esproposal.class_static_fields=enable
|
||||
esproposal.class_instance_fields=enable
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.json
|
||||
module.file_ext=.ios.js
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# get basename
|
||||
# get basename
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
|
||||
experimental.strict_type_args=true
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
|
||||
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
|
||||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.native.js
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.105.0
|
||||
^0.30.0
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
*.pbxproj -text
|
||||
*.patch eol=lf
|
||||
@@ -1,35 +0,0 @@
|
||||
# This is a comment.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# These owners will be the default owners for everything in
|
||||
# the repo. Unless a later match takes precedence,
|
||||
# @global-owner1 and @global-owner2 will be requested for
|
||||
# review when someone opens a pull request.
|
||||
* @status-im/status-core
|
||||
|
||||
/ci @jakubgs
|
||||
/fastlane @jakubgs
|
||||
/scripts @jakubgs
|
||||
/.env* @jakubgs
|
||||
/.TOOLVERSIONS @jakubgs
|
||||
/STATUS_GO_* @jakubgs
|
||||
|
||||
# Order is important; the last matching pattern takes the most
|
||||
# precedence. When someone opens a pull request that only
|
||||
# modifies Nix files, only @js-owner and not the global
|
||||
# owner(s) will be requested for a review.
|
||||
*.nix @jakubgs
|
||||
/nix @jakubgs
|
||||
/.github/ @jakubgs
|
||||
|
||||
/components @status-im/status-core-ui
|
||||
|
||||
desktop/ @vkjr
|
||||
modules/react-native-desktop*/ @vkjr
|
||||
modules/react-native-desktop*/ @vkjr
|
||||
|
||||
/doc @oskarth @yenda @jeluard
|
||||
|
||||
/deployment @vkjr
|
||||
|
||||
/test/appium/ @antdanchenko @churik
|
||||
@@ -8,10 +8,10 @@ These are just guidelines, not rules. Use your best judgment, and feel free to p
|
||||
|
||||
#### What should I know before I get started?
|
||||
|
||||
* [Mission and Core Values](https://status.im/contribute)
|
||||
* [Principles](https://status.im/contribute/our_principles.html)
|
||||
* [Read our FAQ](https://status.im/docs/FAQs.html)
|
||||
* [Join our Chat](http://join.status.im/chat/public/status-core-dev)
|
||||
* [Developer Introduction](https://status.im/developer_tools/)
|
||||
* [Build Status Yourself](https://status.im/build_status)
|
||||
* [Find issues to work on](https://github.com/status-im/)
|
||||
* [Mission and Core Values](http://wiki.status.im/getting-started/mission-and-core-values/)
|
||||
* [Code of Conduct](http://wiki.status.im/getting-started/code-of-conduct/)
|
||||
* [Read our FAQ](http://wiki.status.im/getting-started/faq/)
|
||||
* [Join our Slack](http://slack.status.im/) and chat in `#dev-status`
|
||||
* [Developer Introduction](http://wiki.status.im/contributing/development/introduction/)
|
||||
* [How to Build Status](http://wiki.status.im/contributing/development/building-status/)
|
||||
* [Finding issues to work on](http://wiki.status.im/contributing/development/introduction/#finding-issues-to-work-on)
|
||||
@@ -1,54 +0,0 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Bug Report
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Bug Report
|
||||
|
||||
## Problem
|
||||
|
||||
An overview of the background required to understand the problem.
|
||||
A problem description.
|
||||
|
||||
#### Expected behavior
|
||||
|
||||
[comment]: # (Describe what you expected to happen. Please include designs if possible.)
|
||||
|
||||
#### Actual behavior
|
||||
|
||||
[comment]: # (Describe what actually happened. Please include screenshots if possible.)
|
||||
|
||||
#### Notes
|
||||
|
||||
For the developer who will be investigating. Is it related to another PR? Tips on where to start?
|
||||
|
||||
#### Acceptance Criteria
|
||||
|
||||
Rules for the future PR to be accepted.
|
||||
|
||||
### Reproduction
|
||||
|
||||
[comment]: # (Describe how we can replicate the bug step by step.)
|
||||
|
||||
- Open Status
|
||||
- ...
|
||||
- Step 3, etc.
|
||||
|
||||
### Additional Information
|
||||
|
||||
[comment]: # (Please do your best to fill this out.)
|
||||
- Status version: ...
|
||||
[comment]: # (Android or iOS.)
|
||||
- Operating System: <Android|iOS>
|
||||
|
||||
#### Logs
|
||||
|
||||
[comment]: # (if on Android please replicate bug whilst running adb logcat)
|
||||
|
||||
```
|
||||
...
|
||||
```
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
name: Feature Issue
|
||||
about: Feature Issue
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
# Feature Issue
|
||||
|
||||
[comment]: # (Please replace ... with your information. Remove < and >)
|
||||
|
||||
### User Story
|
||||
|
||||
As a <user|developer|...>, I want to <task> **so that** <goal>.
|
||||
|
||||
### Description
|
||||
|
||||
[comment]: # (Describe the feature you would like and include designs and Figma links if available.)
|
||||
[comment]: # (Describe the use cases the implementation should cover. E.g. New users, existing users, public chat, group chat, etc)
|
||||
*Summary*: ...
|
||||
|
||||
### Acceptance Criteria
|
||||
|
||||
[comment]: # (Rules for the future PR to be accepted.)
|
||||
|
||||
### Notes
|
||||
|
||||
[comment]: # (For the developer who will implement. Include planning poker estimates, guidance, etc.)
|
||||
@@ -1,26 +0,0 @@
|
||||
---
|
||||
name: Simple Issue Report
|
||||
about: Simple issue report.
|
||||
---
|
||||
|
||||
# Problem
|
||||
|
||||
An overview of the background required to understand the problem.
|
||||
A problem description.
|
||||
|
||||
## Implementation
|
||||
|
||||
Known steps towards feature implementation.
|
||||
What needs further specifying and investigating.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
Rules for the future PR to be accepted.
|
||||
|
||||
## Notes
|
||||
|
||||
Random notes to keep in mind while implementing it. Mostly about related issues and future plans and thoughts.
|
||||
|
||||
## Future Steps
|
||||
|
||||
Steps which should be taken after this issue has been resolved.
|
||||
@@ -1,66 +1,16 @@
|
||||
[comment]: # (Please replace ... with your information. Remove < and >)
|
||||
[comment]: # (To auto-close issue on merge, please insert the related issue number after # i.e fixes #566)
|
||||
|
||||
If you submit PR for issue with bounty then write here Fixes #NN where NN is issue number
|
||||
|
||||
*otherwise*
|
||||
|
||||
fixes #...
|
||||
|
||||
### Summary
|
||||
|
||||
### Summary:
|
||||
[comment]: # (Summarise the problem and how the pull request solves it)
|
||||
...
|
||||
|
||||
<!-- (Optional, remove if no changes to documentation) -->
|
||||
Documentation change PR (review please): https://github.com/status-im/status.im/pull/xxx
|
||||
|
||||
### Review notes
|
||||
<!-- (Optional. Specify if something in particular should be looked at, or ignored, during review) -->
|
||||
|
||||
### Testing notes
|
||||
<!-- (Optional) -->
|
||||
|
||||
#### Platforms
|
||||
<!-- (Optional. Specify which platforms should be tested) -->
|
||||
|
||||
- Android
|
||||
- iOS
|
||||
- macOS
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
#### Areas that maybe impacted
|
||||
<!-- (Optional. Specify if some specific areas has to be tested, for example 1-1 chats) -->
|
||||
|
||||
##### Functional
|
||||
|
||||
- 1-1 chats
|
||||
- public chats
|
||||
- group chats
|
||||
- wallet / transactions
|
||||
- dapps / app browsing
|
||||
- account recovery
|
||||
- new account
|
||||
- user profile updates
|
||||
- networks
|
||||
- mailservers
|
||||
- fleet
|
||||
- bootnodes
|
||||
|
||||
##### Non-functional
|
||||
|
||||
- battery performance
|
||||
- CPU performance / speed of the app
|
||||
- network consumption
|
||||
|
||||
### Steps to test
|
||||
<!-- (Specify exact steps to test if there are such) -->
|
||||
|
||||
### Steps to test:
|
||||
- Open Status
|
||||
- ...
|
||||
- Step 3, etc.
|
||||
|
||||
<!-- (PRs will only be accepted if squashed into single commit.) -->
|
||||
[comment]: # (PRs will only be accepted if squashed into single commit.)
|
||||
status: <ready|wip>
|
||||
|
||||
status: ready <!-- Can be ready or wip -->
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
# Set to true to add reviewers to pull requests
|
||||
addReviewers: true
|
||||
|
||||
# Set to true to add assignees to pull requests
|
||||
addAssignees: false
|
||||
|
||||
# A list of reviewers to be added to pull requests (GitHub user name)
|
||||
reviewers:
|
||||
- status-im/status-core
|
||||
|
||||
# A number of reviewers added to the pull request
|
||||
# Set 0 to add all the reviewers (default: 0)
|
||||
numberOfReviewers: 0
|
||||
|
||||
# A list of assignees, overrides reviewers if set
|
||||
# assignees:
|
||||
# - status-im/status-core
|
||||
|
||||
# A number of assignees to add to the pull request
|
||||
# Set to 0 to add all of the assignees.
|
||||
# Uses numberOfReviewers if unset.
|
||||
# numberOfAssignees: 2
|
||||
|
||||
# A list of keywords to be skipped the process that add reviewers if pull requests include it
|
||||
skipKeywords:
|
||||
- wip
|
||||
@@ -1,29 +0,0 @@
|
||||
_extends: probot-settings
|
||||
|
||||
project-board:
|
||||
name: 'Pipeline for QA'
|
||||
min-reviewers: 1
|
||||
tested-pr-label-name: 'Tested - Issues'
|
||||
contributor-column-name: 'CONTRIBUTOR'
|
||||
review-column-name: 'REVIEW'
|
||||
test-column-name: 'E2E Tests'
|
||||
|
||||
automated-tests:
|
||||
repo-full-name: 'status-im/status-react'
|
||||
job-full-name: 'end-to-end-tests/status-app-prs'
|
||||
kickoff-column-name: 'E2E Tests'
|
||||
|
||||
github-team:
|
||||
slug: 'clojure'
|
||||
|
||||
prchecklist:
|
||||
title: Pull Request Checklist
|
||||
checklist:
|
||||
- '**Docs**: Updated the [documentation](https://status.im/build_status/), if affected'
|
||||
- '**Docs**: Added or updated inline comments explaining intention of the code'
|
||||
- '**Tests**: Ensured that all new UI elements have been assigned accessibility IDs'
|
||||
- '**Tests**: Signaled need for E2E tests with label, if applicable'
|
||||
- '**Tests**: Briefly described what was tested and what platforms were used'
|
||||
- '**UI**: In case of UI changes, ensured that UI matches [Figma](https://www.figma.com/)'
|
||||
- '**UI**: In case of UI changes, requested review from a Core UI designer'
|
||||
- '**UI**: In case of UI changes, included screenshots of implementation'
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"recipients": [
|
||||
"jakubgs",
|
||||
"corpetty"
|
||||
]
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
daysUntilStale: 90
|
||||
daysUntilClose: 7
|
||||
exemptLabels:
|
||||
- 'wall of shame'
|
||||
- security
|
||||
staleLabel: stale
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
closeComment: >
|
||||
This issue has been automatically closed. Please re-open if this issue
|
||||
is important to you.
|
||||
|
||||
pulls:
|
||||
daysUntilStale: 14
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
# Xcode
|
||||
#
|
||||
result/
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
@@ -25,51 +24,30 @@ DerivedData
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
project.xcworkspace
|
||||
xcshareddata
|
||||
|
||||
# Android/IJ
|
||||
#
|
||||
.idea
|
||||
.gradle
|
||||
*.iml
|
||||
**/android/.project
|
||||
**/android/.settings/org.eclipse.buildship.core.prefs
|
||||
local.properties
|
||||
|
||||
# Atom
|
||||
.tags*
|
||||
|
||||
# VS Code
|
||||
.vscode/ipch/
|
||||
.vscode/settings.json
|
||||
status-im.iml
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
node_modules.tmp/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
default.realm/
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
android/app/libs
|
||||
android/app/obj
|
||||
android/keystores/debug.keystore
|
||||
!debug.keystore
|
||||
|
||||
# Generated by clj-rn
|
||||
# Generated by re-natal
|
||||
#
|
||||
index.android.js
|
||||
index.ios.js
|
||||
target/
|
||||
env/dev/env/config.cljs
|
||||
externs/
|
||||
shim.js
|
||||
|
||||
# Desktop build
|
||||
index.desktop.js
|
||||
|
||||
# Generated by lein voom
|
||||
#
|
||||
@@ -91,97 +69,13 @@ figwheel_server.log
|
||||
out
|
||||
doo-index.html
|
||||
|
||||
# Bundler
|
||||
.bundle
|
||||
# Re-natal
|
||||
re-natal
|
||||
|
||||
# Status
|
||||
Statusgo.framework
|
||||
status-dev-cli
|
||||
|
||||
#ios
|
||||
/ios/Pods/
|
||||
/ios/StatusIm.xcworkspace
|
||||
.ruby-version
|
||||
status-e2e/
|
||||
|
||||
#python
|
||||
*.pyc
|
||||
*.cache
|
||||
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/README.md
|
||||
|
||||
# Clj
|
||||
|
||||
.cpcache/
|
||||
|
||||
# emacs
|
||||
.dir-locals.el
|
||||
|
||||
#ignore platform-specific files in the root since they are only symlinks to files in folders 'desktop/js_files' and 'mobile/js_files'
|
||||
/package-lock.json
|
||||
/package.json
|
||||
/metro.config.js
|
||||
/yarn.lock
|
||||
/.re-natal
|
||||
/re-natal
|
||||
|
||||
# Jenkins
|
||||
pkg
|
||||
/BUILD_NUMBER
|
||||
|
||||
# Status Desktop
|
||||
cmake_install.cmake
|
||||
CMakeCache.txt
|
||||
**/CMakeFiles/
|
||||
/StatusImPackage/*
|
||||
*.AppImage
|
||||
Status-Windows-x86_64.exe
|
||||
/desktop/bin/*
|
||||
/desktop/lib/*
|
||||
/desktop/modules/*
|
||||
/desktop/Makefile
|
||||
/desktop/graph_info.json
|
||||
/desktop/run-app.bat
|
||||
/desktop/run-app.sh
|
||||
/desktop/CMakeFiles/
|
||||
/desktop/reportApp/Makefile
|
||||
/deployment/windows/Status.rc
|
||||
*_autogen/
|
||||
CompleteBundleWin.cmake
|
||||
logger_settings.ini
|
||||
|
||||
# Conan
|
||||
conan*.txt
|
||||
conanbuildinfo.*
|
||||
conan.cmake
|
||||
|
||||
# Env
|
||||
.env.bkp
|
||||
|
||||
# nix
|
||||
/.ran-setup
|
||||
/.nix-gcroots/
|
||||
/result
|
||||
|
||||
# modules
|
||||
status-modules/translations
|
||||
status-modules/cljs
|
||||
status-modules/resources
|
||||
|
||||
## coverage
|
||||
/.nyc_output
|
||||
/coverage-report
|
||||
|
||||
## fiddle
|
||||
/fiddle/node_modules/
|
||||
/fiddle/target/
|
||||
/fiddle/resources/public/images/
|
||||
|
||||
trace.edn
|
||||
ios/Pods
|
||||
ios/StatusIm.xcworkspace
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Andrea Maria Piana <cammellos@cammelloss-MacBook-Pro.local>
|
||||
Aleksandr Pantyukhov <alwxndr@gmail.com>
|
||||
Aleksandr Pantyukhov <me@alwx.me>
|
||||
Anton Danchenko <adan@ciklum.com>
|
||||
Chad Jackson <chad@status.im>
|
||||
Dmitry Shulyak <yashulyak@gmail.com>
|
||||
Eric Dvorsak <yenda1@gmail.com>
|
||||
Eric Dvorsak <eric@dvorsak.fr>
|
||||
Eric Dvorsak <eric@status.im>
|
||||
George Lipov <gnl@lipov.net>
|
||||
Goran Jović <goranjovic@gmail.com>
|
||||
Jan Herich <jan.herich@gmail.com>
|
||||
Jan Herich <ot73589@OT73589M1.local>
|
||||
Jakub Sokołowski <i+github@always.fail>
|
||||
Jarrad Hope <jarrad@Jarrads-iMac.local>
|
||||
Oskar Thorén <ot@oskarthoren.com>
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"include": [
|
||||
"target/test/status_im/**"
|
||||
],
|
||||
"exclude": [
|
||||
"target/test/status_im/test/**",
|
||||
"target/test/status_im/ui/**"
|
||||
],
|
||||
"report-dir": "./coverage-report",
|
||||
"all": true,
|
||||
"source-map": true,
|
||||
"produce-source-map": true,
|
||||
"instrument": true,
|
||||
"exclude-after-remap": false,
|
||||
"extension": [".js"],
|
||||
"reporter": ["lcovonly"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "StatusIm",
|
||||
"interface": "reagent",
|
||||
"androidHost": "localhost",
|
||||
"modules": [
|
||||
"react-native-contacts",
|
||||
"react-native-invertible-scroll-view",
|
||||
"awesome-phonenumber",
|
||||
"realm",
|
||||
"react-native-i18n",
|
||||
"realm/react-native",
|
||||
"react-native-action-button",
|
||||
"react-native-vector-icons/Ionicons",
|
||||
"react-native-vector-icons/Octicons",
|
||||
"react-native-randombytes",
|
||||
"dismissKeyboard",
|
||||
"react-native-linear-gradient",
|
||||
"react-native-splash-screen",
|
||||
"react-native-android-sms-listener",
|
||||
"react-native-status",
|
||||
"react-native-camera",
|
||||
"react-native-qrcode",
|
||||
"react-native-orientation",
|
||||
"identicon.js",
|
||||
"react-native-fs",
|
||||
"react-native-dialogs",
|
||||
"react-native-popup-menu",
|
||||
"react-native-sortable-listview",
|
||||
"react-native-image-resizer",
|
||||
"react-native-image-crop-picker",
|
||||
"react-native-webview-bridge",
|
||||
"react-native-drawer-layout",
|
||||
"homoglyph-finder",
|
||||
"web3",
|
||||
"eccjs",
|
||||
"chance",
|
||||
"react-native-swiper",
|
||||
"react-native-emoji-picker",
|
||||
"react-native-autolink",
|
||||
"instabug-reactnative",
|
||||
"nfc-react-native",
|
||||
"react-native-http-bridge",
|
||||
"emojilib",
|
||||
"react-native-mapbox-gl",
|
||||
"bignumber.js",
|
||||
"react-native-config"
|
||||
],
|
||||
"imageDirs": [
|
||||
"images"
|
||||
],
|
||||
"iosHost": "10.0.1.4",
|
||||
"envRoots": {
|
||||
"dev": "env/dev",
|
||||
"prod": "env/prod"
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.android": "groovy",
|
||||
"*.ios": "groovy",
|
||||
"*.linux": "groovy",
|
||||
"*.macos": "groovy",
|
||||
"*.windows": "groovy",
|
||||
"*.nix-cache": "groovy",
|
||||
},
|
||||
}
|
||||
@@ -1,6 +1 @@
|
||||
{
|
||||
"ignore_dirs": [
|
||||
"android/build",
|
||||
"target"
|
||||
]
|
||||
}
|
||||
{}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Change Log
|
||||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/).
|
||||
|
||||
## [Unreleased][unreleased]
|
||||
### Changed
|
||||
- Add a new arity to `make-widget-async` to provide a different widget shape.
|
||||
|
||||
## [0.1.1] - 2016-03-23
|
||||
### Changed
|
||||
- Documentation on how to make the widgets.
|
||||
|
||||
### Removed
|
||||
- `make-widget-sync` - we're all async, all the time.
|
||||
|
||||
### Fixed
|
||||
- Fixed widget maker to keep working when daylight savings switches over.
|
||||
|
||||
## 0.1.0 - 2016-03-23
|
||||
### Added
|
||||
- Files from the new template.
|
||||
- Widget maker public API - `make-widget-sync`.
|
||||
|
||||
[unreleased]: https://github.com/your-name/status-im/compare/0.1.1...HEAD
|
||||
[0.1.1]: https://github.com/your-name/status-im/compare/0.1.0...0.1.1
|
||||
@@ -1,28 +0,0 @@
|
||||
# new icons
|
||||
|
||||
## Export icons
|
||||
|
||||

|
||||
|
||||
## android
|
||||
1. copy files to corresponding directories at `/Users/romanvolosovskyi/clj/status-react/android/app/src/main/res` (one of `drawable-hdpi`, `drawable-mdpi`, `drawable-xhdpi`, `drawable-xxhdpi`, `drawable-xxxhdpi` for corresponding resolution)
|
||||
If you only have 3 pngs 1x, 2x and 3x put them in mdpi, xhdpi and xxhdpi
|
||||
3. if necessary, rename file so that filename contains only lower case chars, and dashes instead of hyphens, e.g. `"Icon-Name.png"` should be renamed to `"icon_name.png"`.
|
||||
4. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
|
||||
```clojure
|
||||
;; icon_name.png
|
||||
[vector-icons/icon :icon-name {:color ...}]
|
||||
```
|
||||
|
||||
## ios
|
||||
1. open xcode (on macos run `open ios/StatusIm.xcworkspace` from project's root dir)
|
||||
2. go to `StatusIm/StatusIm/Images.xcassets` in xcode
|
||||

|
||||
3. add images there
|
||||
4. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name.png"` should be renamed to `"icon-name"`.
|
||||
5. **IMPORTANT** there is no need to replace hyphens with dashes, and if you do so you will need to use names with dashes in both android and ios versions. So use dashes for android resources names and hyphens for ios.
|
||||
6. And now `"icon-name"` can be added in app the same way as it was added for android version
|
||||
```clojure
|
||||
;; icon-name
|
||||
[vector-icons/icon :icon-name {:color ...}]
|
||||
```
|
||||
@@ -0,0 +1,83 @@
|
||||
env.LANG="en_US.UTF-8"
|
||||
env.LANGUAGE="en_US.UTF-8"
|
||||
env.LC_ALL="en_US.UTF-8"
|
||||
node {
|
||||
def apkUrl = ''
|
||||
def ipaUrl = ''
|
||||
def testPassed = true
|
||||
|
||||
sh 'source /etc/profile'
|
||||
|
||||
try {
|
||||
|
||||
stage('Git & Dependencies') {
|
||||
git([url: 'https://github.com/status-im/status-react.git', branch: env.BRANCH_NAME])
|
||||
// Checkout master because used for iOS Plist version information
|
||||
sh 'git checkout -- .'
|
||||
sh 'git checkout master'
|
||||
sh 'git checkout ' + env.BRANCH_NAME
|
||||
sh 'rm -rf node_modules'
|
||||
sh 'cp .env.jenkins .env'
|
||||
sh 'lein deps && npm install && ./re-natal deps'
|
||||
sh 'sed -i "" "s/301000/601000/g" node_modules/react-native/packager/src/JSTransformer/index.js'
|
||||
sh 'lein generate-externs'
|
||||
sh 'mvn -f modules/react-native-status/ios/RCTStatus dependency:unpack'
|
||||
sh 'cd ios && pod install && cd ..'
|
||||
}
|
||||
|
||||
stage('Tests') {
|
||||
sh 'lein test-cljs'
|
||||
}
|
||||
|
||||
stage('Build') {
|
||||
sh 'lein prod-build'
|
||||
}
|
||||
|
||||
// Android
|
||||
stage('Build (Android)') {
|
||||
sh 'cd android && ./gradlew assembleRelease'
|
||||
}
|
||||
stage('Deploy (Android)') {
|
||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@android/app/build/outputs/apk/app-release.apk -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||
sh 'sleep 10'
|
||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||
apkUrl = 'https://i.diawi.com/' + hash
|
||||
}
|
||||
}
|
||||
|
||||
// try {
|
||||
// stage('Test (Android)') {
|
||||
// sauce('b9aded57-5cc1-4f6b-b5ea-42d989987852') {
|
||||
// sh 'cd test/appium && mvn -DapkUrl=' + apkUrl + ' test'
|
||||
// saucePublisher()
|
||||
// }
|
||||
// }
|
||||
// } catch(e) {
|
||||
// testPassed = false
|
||||
// }
|
||||
|
||||
// iOS
|
||||
stage('Build (iOS)') {
|
||||
sh 'export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration release -archivePath status clean archive'
|
||||
sh 'xcodebuild -exportArchive -exportPath status -archivePath status.xcarchive -exportOptionsPlist /Users/Xcloud/archive.plist'
|
||||
}
|
||||
stage('Deploy (iOS)') {
|
||||
withCredentials([string(credentialsId: 'diawi-token', variable: 'token')]) {
|
||||
def job = sh(returnStdout: true, script: 'curl https://upload.diawi.com/ -F token='+token+' -F file=@status/StatusIm.ipa -F find_by_udid=0 -F wall_of_apps=0 | jq -r ".job"').trim()
|
||||
sh 'sleep 10'
|
||||
def hash = sh(returnStdout: true, script: "curl -vvv 'https://upload.diawi.com/status?token="+token+"&job="+job+"'|jq -r '.hash'").trim()
|
||||
ipaUrl = 'https://i.diawi.com/' + hash
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
slackSend color: 'bad', message: env.BRANCH_NAME + ' failed to build. ' + env.BUILD_URL
|
||||
throw e
|
||||
}
|
||||
|
||||
stage('Slack Notification') {
|
||||
def c = (testPassed ? 'good' : 'warning' )
|
||||
slackSend color: c, message: 'Branch: ' + env.BRANCH_NAME + '\nTests: ' + (testPassed ? ':+1:' : ':-1:') + ')\nAndroid: ' + apkUrl + '\n iOS: ' + ipaUrl
|
||||
}
|
||||
}
|
||||
@@ -1,389 +0,0 @@
|
||||
.PHONY: nix-add-gcroots clean nix-clean disable-githooks react-native-android react-native-ios react-native-desktop test release _list _fix-node-perms _tmpdir-mk _tmpdir-rm
|
||||
|
||||
help: SHELL := /bin/sh
|
||||
help: ##@other Show this help
|
||||
@perl -e '$(HELP_FUN)' $(MAKEFILE_LIST)
|
||||
|
||||
# This is a code for automatic help generator.
|
||||
# It supports ANSI colors and categories.
|
||||
# To add new item into help output, simply add comments
|
||||
# starting with '##'. To add category, use @category.
|
||||
GREEN := $(shell tput -Txterm setaf 2)
|
||||
RED := $(shell tput -Txterm setaf 1)
|
||||
WHITE := $(shell tput -Txterm setaf 7)
|
||||
YELLOW := $(shell tput -Txterm setaf 3)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
HELP_FUN = \
|
||||
%help; \
|
||||
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
|
||||
print "Usage: make [target]\n\n"; \
|
||||
for (sort keys %help) { \
|
||||
print "${WHITE}$$_:${RESET}\n"; \
|
||||
for (@{$$help{$$_}}) { \
|
||||
$$sep = " " x (32 - length $$_->[0]); \
|
||||
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
|
||||
}; \
|
||||
print "\n"; \
|
||||
}
|
||||
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
# This can come from Jenkins
|
||||
ifndef BUILD_TAG
|
||||
export BUILD_TAG := $(shell git rev-parse --short HEAD)
|
||||
endif
|
||||
|
||||
# We don't want to use /run/user/$UID because it runs out of space too easilly
|
||||
export TMPDIR = /tmp/tmp-status-react-$(BUILD_TAG)
|
||||
# this has to be specified for both the Node.JS server process and the Qt process
|
||||
export REACT_SERVER_PORT ?= 5001
|
||||
|
||||
# Our custom config is located in nix/nix.conf
|
||||
export NIX_CONF_DIR = $(PWD)/nix
|
||||
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
|
||||
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE,NIMBUS_SRC_OVERRIDE
|
||||
export _NIX_ROOT = /nix
|
||||
# legacy TARGET_OS variable support
|
||||
ifdef TARGET_OS
|
||||
export TARGET ?= $(TARGET_OS)
|
||||
endif
|
||||
|
||||
# Useful for checking if we are on NixOS
|
||||
OS_NAME := $(shell awk -F= '/^NAME/{print $2}' /etc/os-release)
|
||||
|
||||
# Useful for Andoird release builds
|
||||
TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10)
|
||||
|
||||
# MacOS root is read-only, read nix/README.md for details
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
export NIX_IGNORE_SYMLINK_STORE=1
|
||||
export _NIX_ROOT = /opt/nix
|
||||
endif
|
||||
|
||||
#----------------
|
||||
# Nix targets
|
||||
#----------------
|
||||
|
||||
# WARNING: This has to be located right before the targets
|
||||
ifdef IN_NIX_SHELL
|
||||
SHELL := env bash
|
||||
else
|
||||
SHELL := ./nix/scripts/shell.sh
|
||||
endif
|
||||
|
||||
shell: ##@prepare Enter into a pre-configured shell
|
||||
ifndef IN_NIX_SHELL
|
||||
@ENTER_NIX_SHELL
|
||||
else
|
||||
@echo "${YELLOW}Nix shell is already active$(RESET)"
|
||||
endif
|
||||
|
||||
nix-gc: ##@nix Garbage collect all packages older than 20 days from /nix/store
|
||||
nix-collect-garbage --delete-old --delete-older-than 20d
|
||||
|
||||
nix-clean: ##@nix Remove all status-react build artifacts from /nix/store
|
||||
nix/scripts/clean.sh
|
||||
|
||||
nix-purge: SHELL := /bin/sh
|
||||
nix-purge: ##@nix Completely remove the complete Nix setup
|
||||
ifeq ($(OS_NAME), NixOS)
|
||||
$(error $(RED)You should not purge Nix files on NixOS!$(RESET))
|
||||
else
|
||||
sudo rm -rf $(_NIX_ROOT)/* ~/.nix-profile ~/.nix-defexpr ~/.nix-channels ~/.cache/nix ~/.status .nix-gcroots
|
||||
endif
|
||||
|
||||
nix-add-gcroots: export TARGET := default
|
||||
nix-add-gcroots: ##@nix Add Nix GC roots to avoid status-react expressions being garbage collected
|
||||
nix/scripts/gcroots.sh
|
||||
|
||||
nix-update-gradle: ##@nix Update maven nix expressions based on current gradle setup
|
||||
nix/mobile/android/maven-and-npm-deps/maven/generate-nix.sh
|
||||
|
||||
nix-update-lein: export TARGET := lein
|
||||
nix-update-lein: ##@nix Update maven nix expressions based on current lein setup
|
||||
nix/tools/lein/generate-nix.sh nix/lein
|
||||
|
||||
nix-update-gems: export TARGET := lein
|
||||
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
|
||||
fastlane/update.sh
|
||||
|
||||
nix-update-pods: export TARGET := ios
|
||||
nix-update-pods: ##@nix Update CocoaPods in ios/Podfile.lock
|
||||
cd ios && pod update
|
||||
|
||||
#----------------
|
||||
# General targets
|
||||
#----------------
|
||||
|
||||
_fix-node-perms: SHELL := /bin/sh
|
||||
_fix-node-perms: ##@prepare Fix permissions so that directory can be cleaned
|
||||
$(shell test -d node_modules && chmod -R 744 node_modules)
|
||||
$(shell test -d node_modules.tmp && chmod -R 744 node_modules.tmp)
|
||||
|
||||
_tmpdir-mk: SHELL := /bin/sh
|
||||
_tmpdir-mk: ##@prepare Create a TMPDIR for temporary files
|
||||
@mkdir -p "$(TMPDIR)"
|
||||
# Make sure TMPDIR exists every time make is called
|
||||
-include _tmpdir-mk
|
||||
|
||||
_tmpdir-rm: SHELL := /bin/sh
|
||||
_tmpdir-rm: ##@prepare Remove TMPDIR
|
||||
rm -fr "$(TMPDIR)"
|
||||
|
||||
clean: SHELL := /bin/sh
|
||||
clean: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
|
||||
git clean -dxf
|
||||
|
||||
watchman-clean: export TARGET := watchman
|
||||
watchman-clean: ##@prepare Delete repo directory from watchman
|
||||
watchman watch-del $${STATUS_REACT_HOME}
|
||||
|
||||
disable-githooks: SHELL := /bin/sh
|
||||
disable-githooks: ##@prepare Disables lein githooks
|
||||
@rm -f ${env.WORKSPACE}/.git/hooks/pre-commit && \
|
||||
sed -i'~' -e 's|\[rasom/lein-githooks|;; [rasom/lein-githooks|' \
|
||||
-e 's|:githooks|;; :githooks|' \
|
||||
-e 's|:pre-commit|;; :pre-commit|' project.clj; \
|
||||
rm project.clj~
|
||||
|
||||
pod-install: export TARGET := ios
|
||||
pod-install: ##@prepare Run 'pod install' to install podfiles and update Podfile.lock
|
||||
cd ios && pod install; cd --
|
||||
|
||||
update-fleets: ##@prepare Download up-to-date JSON file with current fleets state
|
||||
curl -s https://fleets.status.im/ \
|
||||
| jq --indent 4 --sort-keys . \
|
||||
> resources/config/fleets.json
|
||||
|
||||
keystore: export TARGET := keytool
|
||||
keystore: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
keystore: ##@prepare Generate a Keystore for signing Android APKs
|
||||
@./scripts/generate-keystore.sh
|
||||
|
||||
#----------------
|
||||
# Release builds
|
||||
#----------------
|
||||
release: release-android release-ios ##@build build release for Android and iOS
|
||||
|
||||
release-android: export TARGET := android
|
||||
release-android: export BUILD_ENV ?= prod
|
||||
release-android: export BUILD_TYPE ?= nightly
|
||||
release-android: export BUILD_NUMBER ?= $(TMP_BUILD_NUMBER)
|
||||
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
|
||||
release-android: export ANDROID_ABI_SPLIT ?= false
|
||||
release-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
|
||||
release-android: keystore ##@build build release for Android
|
||||
scripts/release-android.sh
|
||||
|
||||
release-ios: export TARGET ?= ios
|
||||
release-ios: export BUILD_ENV ?= prod
|
||||
release-ios: watchman-clean ##@build build release for iOS release
|
||||
@git clean -dxf -f target/ios && \
|
||||
$(MAKE) jsbundle-ios && \
|
||||
scripts/copy-translations.sh && \
|
||||
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive
|
||||
|
||||
release-desktop: export TARGET ?= $(HOST_OS)
|
||||
release-desktop: ##@build build release for desktop release based on TARGET
|
||||
@$(MAKE) jsbundle-desktop && \
|
||||
scripts/copy-translations.sh && \
|
||||
scripts/build-desktop.sh; \
|
||||
$(MAKE) watchman-clean
|
||||
|
||||
release-windows-desktop: export TARGET ?= windows
|
||||
release-windows-desktop: ##@build build release for windows desktop release
|
||||
@$(MAKE) jsbundle-desktop && \
|
||||
scripts/copy-translations.sh && \
|
||||
scripts/build-desktop.sh; \
|
||||
$(MAKE) watchman-clean
|
||||
|
||||
prod-build-android: jsbundle-android ##@legacy temporary legacy alias for jsbundle-android
|
||||
@echo "${YELLOW}This a deprecated target name, use jsbundle-android.$(RESET)"
|
||||
|
||||
jsbundle-android: SHELL := /bin/sh
|
||||
jsbundle-android: export TARGET ?= android
|
||||
jsbundle-android: export BUILD_ENV ?= prod
|
||||
jsbundle-android: ##@jsbundle Compile JavaScript and Clojure into index.android.js
|
||||
# Call nix-build to build the 'targets.mobile.android.jsbundle' attribute and copy the index.android.js file to the project root
|
||||
@git clean -dxf ./index.$(TARGET).js
|
||||
nix/scripts/build.sh targets.mobile.android.jsbundle && \
|
||||
mv result/index.$(TARGET).js ./
|
||||
|
||||
prod-build-ios: jsbundle-ios ##@legacy temporary legacy alias for jsbundle-ios
|
||||
@echo "${YELLOW}This a deprecated target name, use jsbundle-ios.$(RESET)"
|
||||
|
||||
jsbundle-ios: export TARGET ?= ios
|
||||
jsbundle-ios: export BUILD_ENV ?= prod
|
||||
jsbundle-ios: ##@jsbundle Compile JavaScript and Clojure into index.ios.js
|
||||
@git clean -dxf -f ./index.$(TARGET).js && \
|
||||
lein jsbundle-ios && \
|
||||
node prepare-modules.js
|
||||
|
||||
prod-build-desktop: jsbundle-desktop ##@legacy temporary legacy alias for jsbundle-desktop
|
||||
@echo "${YELLOW}This a deprecated target name, use jsbundle-desktop.$(RESET)"
|
||||
|
||||
jsbundle-desktop: export TARGET ?= $(HOST_OS)
|
||||
jsbundle-desktop: export BUILD_ENV ?= prod
|
||||
jsbundle-desktop: ##@jsbundle Compile JavaScript and Clojure into index.desktop.js
|
||||
git clean -qdxf -f ./index.desktop.js desktop/ && \
|
||||
lein jsbundle-desktop && \
|
||||
node prepare-modules.js
|
||||
|
||||
#--------------
|
||||
# REPL
|
||||
# -------------
|
||||
|
||||
_watch-%: ##@watch Start development for device
|
||||
$(eval SYSTEM := $(word 2, $(subst -, , $@)))
|
||||
$(eval DEVICE := $(word 3, $(subst -, , $@)))
|
||||
clj -R:dev build.clj watch --platform $(SYSTEM) --$(SYSTEM)-device $(DEVICE)
|
||||
|
||||
watch-ios-real: export TARGET := ios
|
||||
watch-ios-real: _watch-ios-real ##@watch Start development for iOS real device
|
||||
|
||||
watch-ios-simulator: export TARGET := ios
|
||||
watch-ios-simulator: _watch-ios-simulator ##@watch Start development for iOS simulator
|
||||
|
||||
watch-android-real: export TARGET := android
|
||||
watch-android-real: _watch-android-real ##@watch Start development for Android real device
|
||||
|
||||
watch-android-avd: export TARGET := android
|
||||
watch-android-avd: _watch-android-avd ##@watch Start development for Android AVD
|
||||
|
||||
watch-android-genymotion: export TARGET ?= android
|
||||
watch-android-genymotion: _watch-android-genymotion ##@watch Start development for Android Genymotion
|
||||
|
||||
watch-desktop: export TARGET ?= $(HOST_OS)
|
||||
watch-desktop: ##@watch Start development for Desktop
|
||||
clj -R:dev build.clj watch --platform desktop
|
||||
|
||||
desktop-server: export TARGET ?= $(HOST_OS)
|
||||
desktop-server:
|
||||
node ubuntu-server.js
|
||||
|
||||
#--------------
|
||||
# Run
|
||||
# -------------
|
||||
_run-%:
|
||||
$(eval SYSTEM := $(word 2, $(subst -, , $@)))
|
||||
npx react-native run-$(SYSTEM)
|
||||
|
||||
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
|
||||
run-android: export TARGET := android
|
||||
run-android: ##@run Run Android build
|
||||
npx react-native run-android --appIdSuffix debug
|
||||
|
||||
run-desktop: export TARGET ?= $(HOST_OS)
|
||||
run-desktop: _run-desktop ##@run Run Desktop build
|
||||
|
||||
SIMULATOR=
|
||||
run-ios: export TARGET := ios
|
||||
run-ios: ##@run Run iOS build
|
||||
ifneq ("$(SIMULATOR)", "")
|
||||
npx react-native run-ios --simulator="$(SIMULATOR)"
|
||||
else
|
||||
npx react-native run-ios
|
||||
endif
|
||||
|
||||
#--------------
|
||||
# Tests
|
||||
#--------------
|
||||
|
||||
lint: export TARGET := lein
|
||||
lint: ##@test Run code style checks
|
||||
lein cljfmt check
|
||||
|
||||
lint-fix: export TARGET := lein
|
||||
lint-fix: ##@test Run code style checks and fix issues
|
||||
lein cljfmt fix
|
||||
|
||||
test: export TARGET := lein
|
||||
test: ##@test Run tests once in NodeJS
|
||||
lein with-profile test doo node test once
|
||||
|
||||
test-auto: export TARGET := lein
|
||||
test-auto: ##@test Run tests in interactive (auto) mode in NodeJS
|
||||
lein with-profile test doo node test
|
||||
|
||||
coverage: ##@test Run tests once in NodeJS generating coverage
|
||||
@scripts/run-coverage.sh
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
react-native-desktop: export TARGET ?= $(HOST_OS)
|
||||
react-native-desktop: export _NIX_PURE ?= true
|
||||
react-native-desktop: ##@other Start react native packager
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
react-native-android: export TARGET := android
|
||||
react-native-android: export _NIX_PURE ?= true
|
||||
react-native-android: ##@other Start react native packager for Android client
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
react-native-ios: export TARGET := ios
|
||||
react-native-ios: export _NIX_PURE ?= true
|
||||
react-native-ios: ##@other Start react native packager for Android client
|
||||
@scripts/start-react-native.sh
|
||||
|
||||
geth-connect: export TARGET := android-env
|
||||
geth-connect: ##@other Connect to Geth on the device
|
||||
adb forward tcp:8545 tcp:8545 && \
|
||||
build/bin/geth attach http://localhost:8545
|
||||
|
||||
android-clean: ##@prepare Clean Gradle state
|
||||
git clean -dxf -f ./android/app/build
|
||||
[ -d android/.gradle ] && cd android && ./gradlew clean
|
||||
|
||||
android-ports: export TARGET := android-env
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb forward tcp:5561 tcp:5561
|
||||
|
||||
android-devices: export TARGET := android-env
|
||||
android-devices: ##@other Invoke adb devices
|
||||
adb devices
|
||||
|
||||
android-logcat: export TARGET := android-env
|
||||
android-logcat: ##@other Read status-react logs from Android phone using adb
|
||||
adb logcat | grep -e RNBootstrap -e ReactNativeJS -e ReactNative -e StatusModule -e StatusNativeLogs -e 'F DEBUG :' -e 'Go :' -e 'GoLog :' -e 'libc :'
|
||||
|
||||
android-install: export TARGET := android-env
|
||||
android-install: export BUILD_TYPE ?= release
|
||||
android-install:
|
||||
adb install result/app-$(BUILD_TYPE).apk
|
||||
|
||||
_list: SHELL := /bin/sh
|
||||
_list:
|
||||
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
||||
|
||||
_unknown-startdev-target-%: SHELL := /bin/sh
|
||||
_unknown-startdev-target-%:
|
||||
@ echo "Unknown target device '$*'. Supported targets:"; \
|
||||
${MAKE} _list | grep "watch-" | sed s/watch-/startdev-/; \
|
||||
exit 1
|
||||
|
||||
_startdev-%: SHELL := /bin/sh
|
||||
_startdev-%:
|
||||
$(eval SYSTEM := $(word 2, $(subst -, , $@)))
|
||||
$(eval DEVICE := $(word 3, $(subst -, , $@)))
|
||||
@ if [ -z "$(DEVICE)" ]; then \
|
||||
$(MAKE) watch-$(SYSTEM) || $(MAKE) _unknown-startdev-target-$@; \
|
||||
else \
|
||||
$(MAKE) watch-$(SYSTEM)-$(DEVICE) || $(MAKE) _unknown-startdev-target-$@; \
|
||||
fi
|
||||
|
||||
startdev-android-avd: export TARGET = android
|
||||
startdev-android-avd: _startdev-android-avd
|
||||
startdev-android-genymotion: export TARGET = android
|
||||
startdev-android-genymotion: _startdev-android-genymotion
|
||||
startdev-android-real: export TARGET = android
|
||||
startdev-android-real: _startdev-android-real
|
||||
startdev-desktop: export TARGET ?= $(HOST_OS)
|
||||
startdev-desktop: _startdev-desktop
|
||||
startdev-ios-real: export TARGET = ios
|
||||
startdev-ios-real: _startdev-ios-real
|
||||
startdev-ios-simulator: export TARGET = ios
|
||||
startdev-ios-simulator: _startdev-ios-simulator
|
||||
@@ -1,3 +1,5 @@
|
||||

|
||||
[](https://saucelabs.com/beta/builds/50ccf11ec1a44d88b6eb989929e5789f)
|
||||
|
||||
# Status - a Mobile Ethereum Operating System
|
||||
|
||||
@@ -5,6 +7,7 @@ Join us in creating a browser, messenger, and gateway to a decentralized world.
|
||||
|
||||
[](https://www.youtube.com/watch?v=oDCSEmS9c3o "Getting started with Status")
|
||||
|
||||
|
||||
## Why?
|
||||
|
||||
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
|
||||
@@ -17,54 +20,77 @@ If this interests you, **help us make Status a reality** - anyone can contribute
|
||||
|
||||
## How to Contribute?
|
||||
|
||||
Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
|
||||
Go straight to the [wiki](https://wiki.status.im) or [join our Slack](http://slack.status.im) or choose what interests you:
|
||||
|
||||
- **Developer**
|
||||
- **Developer**
|
||||
Developers are the heart of software and to keep Status beating we need all the help we can get! If you're looking to code in ClojureScript or Golang then Status is the project for you! We use React Native and there is even some Java/Objective-C too!
|
||||
Want to learn more about it? Start by reading our [Developer Introduction](https://status.im/developer_tools/) which guides you through the technology stack and start browsing [beginner issues](https://github.com/status-im/status-react/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20). Then you can read how to [Build Status](https://status.im/build_status/), which talks about managing project dependencies, coding guidelines and testing procedures.
|
||||
Want to learn more about it? Start by reading our [Developer Introduction](http://wiki.status.im/contributing/development/introduction/) which guides you through the technology stack and and start browsing [beginner issues](https://github.com/status-im/status-react/issues?q=is%3Aopen+is%3Aissue+label%3Abeginner). Then you can read how to [Build Status](http://wiki.status.im/contributing/development/building-status/), which talks about managing project dependencies, coding guidelines and testing procedures.
|
||||
|
||||
- **Community Management**
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Community Principles](https://status.im/contribute/our_principles.html)
|
||||
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes alot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Community Development Guide](https://wiki.status.im/community/how-to-grow-our-community/)
|
||||
|
||||
- **Specification / Documentation**
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
|
||||
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [wiki](https://wiki.status.im) and see how you can improve what we have.
|
||||
|
||||
- **Blog Writing**
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
|
||||
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump on our Slack](http://slack.status.im) and discuss with Carl how you can contribute.
|
||||
|
||||
- **Marketing**
|
||||
In this day and age attention is limited, we need all the help we can get to find people who are interested in Status, whether that is paid user acquisition, public relations or hype building, check out our [Community Outreach and Marketing Guide](http://wiki.status.im/contributing/outreach/) to see how you can spread the word.
|
||||
|
||||
- **Testers**
|
||||
It's bug hunting season! Status is currently in Alpha and there is sure to be a bunch of learning, [build status from scratch](https://status.im/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-react/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
It's bug hunting season! Status is currently in Alpha and there are sure to be a bunch of education, [grab your fresh copy of Status](http://wiki.status.im/contributing/development/building-status/) and shake your phone to submit bug reports, or start browsing our [Github Issues](http://github.com/status-im/status-react/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
|
||||
|
||||
- **Security**
|
||||
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
|
||||
|
||||
- **Evangelism**
|
||||
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
|
||||
- **Design & User Experience**
|
||||
It's all about that sex appeal, we want cryptocurrencies to be easy and fun to use, ugly software doesn't help adoption. [Check out our designs](http://wiki.status.im/contributing/design-guidelines/) and show us how to make them better!
|
||||
|
||||
## Status API
|
||||
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).
|
||||
- **Evangelism**
|
||||
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts!
|
||||
|
||||
## Give me Binaries!
|
||||
|
||||
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/build_status/).
|
||||
Currently the fastest way to get your hands on a binary is to join our Early Access by submitting your email on our [website](https://status.im) or by [building it yourself](https://wiki.status.im/contributing/development/building-status/).
|
||||
|
||||
// TODO GPlay, TestFlight Instructions & FDroid
|
||||
|
||||
## Core Contributors
|
||||
|
||||
[Core Team Members](https://github.com/orgs/status-im/people)
|
||||
<img src="https://status.im/img/new-site/jarrad.png" width="80px"></img>
|
||||
Jarrad ([@jarradh](https://github.com/jarradh)) - Cofounder and Thought Leader.
|
||||
|
||||
<img src="https://status.im/img/new-site/carl.png" width="80px"></img>
|
||||
Carl ([@carlbennetts](https://github.com/carlbennetts)) - Cofounder and Communications & Marketing.
|
||||
|
||||
<img src="https://status.im/img/new-site/roman.png" width="80px"></img>
|
||||
Roman ([@rasom](https://github.com/rasom)) - Clojure and project lead.
|
||||
|
||||
<img src="https://status.im/img/new-site/alexander.png" width="80px"></img>
|
||||
Alexander ([@alwx](https://github.com/alwx)) - Clojure ninja!
|
||||
|
||||
<img src="https://status.im/img/new-site/andrey.png" width="80px"></img>
|
||||
Andrey ([@flexsurfer](https://github.com/flexsurfer)) - Clojure.
|
||||
|
||||
<img src="https://status.im/img/new-site/gustavo.png" width="80px"></img>
|
||||
Gustavo ([@GustavoNunes](https://github.com/GustavoNunes)) - Clojure.
|
||||
|
||||
<img src="https://status.im/img/new-site/victor.png" width="80px"></img>
|
||||
Victor ([@farazdagi](https://github.com/farazdagi)) - Golang one-man-army.
|
||||
|
||||
<img src="https://status.im/img/new-site/andrei.png" width="80px"></img>
|
||||
Andrei ([@andmironov](https://github.com/andmironov)) - Visual design and user experience conjurer.
|
||||
|
||||
Special thanks to [@adrian-tiberius](https://github.com/adrian-tiberius).
|
||||
Without the dedication of these outstanding individuals, Status would not exist.
|
||||
Without the dedication of these fine gentleman, Status would not exist.
|
||||
|
||||
## Contact us
|
||||
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
|
||||
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our Slack](http://slack.status.im).
|
||||
|
||||
Got a feature request or suggestion, download Status and shake your phone, failing that search our [Github Issues](http://github.com/status-im/status-react/issues).
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-react/blob/develop/LICENSE.md)
|
||||
|
||||
## Testing Supported by
|
||||
|
||||
[](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
|
||||
|
||||
[](https://coveralls.io/github/status-im/status-react)
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
This document MUST be updated everytime a PR has been identified has the source of a bug in develop. The post mortem analysis MUST include: the CAUSE of the bug, the RESOLUTION PROCESS and PREVENTION MEASURES.
|
||||
|
||||
|
||||
# "sql: no rows in result set" error on iOS login
|
||||
|
||||
## Cause
|
||||
|
||||
There were errors in the iOS native code:
|
||||
- "loginWithKeycard" method was not implemented
|
||||
- "createAndLoginWithKeycard" method was actually used instead of "createAndLogin** which is used for regular account creation without keycard and doesn't have the same final argument
|
||||
|
||||
QA process was focused on account creation and login with keycard, and this bug would only appear specifically on iOS when creating an account without keycard and only during the next login. It was therefore a more complex path to reach than what could have been expected from this PR, and it was caused in develop by a developer working on iOS simulator because that is a common path during development.
|
||||
|
||||
## Resolution process
|
||||
|
||||
- the commit was reverted locally by the developer which fixed the issue localy and confirmed the faulty commit
|
||||
- the bug was only reproducible on iOS which strongly hinted at a potential issue with native code
|
||||
- the missing method was not the origin of the problem but was found at this point and further analysis lead to the shadowing error
|
||||
|
||||
## Prevention measures
|
||||
|
||||
- PRs that change native code should be checked for platform parity:
|
||||
- same methods are created/modified for each platform
|
||||
- test cases in the PR should take these methods in consideration
|
||||
|
||||
# Missing labels for en translation
|
||||
|
||||
https://github.com/status-im/status-react/issues/9003
|
||||
|
||||
## Cause
|
||||
|
||||
Unused labels in the application have been listed by QA and an issue created for their removal. The PR was made by an external contributor and it had to be rebased many time because it touched many files and other PRs got merged before this one could be tested. After a last rebase the PR was merged with 100% e2e test but no manual testing.
|
||||
|
||||
The reason some translations got deleted despite the fact that they were used is because the `message status` related labels were not explicitly mentioned in the code unlike every other labels. They were built from the actual `message status` and the prefix `status-`.
|
||||
|
||||
## Resolution process
|
||||
|
||||
The mistake was quickly noticed in develop and an issue created. The fix was to recover the 3 labels that were accidentally deleted.
|
||||
|
||||
## Prevention measures
|
||||
|
||||
The code has been changed so that the labels are no longer generated and appear in the code like other labels.
|
||||
@@ -1,50 +0,0 @@
|
||||
# Description
|
||||
|
||||
This document provides information on how to start developing Status App.
|
||||
|
||||
# Getting Started
|
||||
|
||||
To start developing start a shell for platform you are interested in.
|
||||
```
|
||||
make shell TARGET=android
|
||||
```
|
||||
This step will take a while the first time as it will download all dependencies.
|
||||
|
||||
To build the app, your can simply run on of the following:
|
||||
```
|
||||
make release-android
|
||||
make release-ios
|
||||
```
|
||||
For more `make` targets run `make help`.
|
||||
|
||||
# Manual Steps
|
||||
|
||||
There are a few manual steps you might want to do in order to start contributing.
|
||||
|
||||
## Genymotion Virtualization
|
||||
|
||||
Optionally set up Genymotion if you don't want to use Android Virtual Device:
|
||||
|
||||
https://www.genymotion.com
|
||||
|
||||
## Android Development Environment
|
||||
|
||||
You can also setup Android Development Environment + Simulator:
|
||||
|
||||
https://facebook.github.io/react-native/docs/getting-started.html
|
||||
|
||||
## Configure GitHub Account
|
||||
|
||||
The optimal way of pushing to GitHubis using SSH instead of user/pass auth.
|
||||
|
||||
It's recommented that you [add your public SSH key to your GitHub account](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account).
|
||||
|
||||
## Configure GPG Keys for signing commits
|
||||
|
||||
In order to increase security we require all commits in `status-react` repo to be signed with a GPG key.
|
||||
|
||||
Steps:
|
||||
1. [Generate a new GPG key](https://help.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key)
|
||||
2. [Setup Git to use your GPG key](https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key)
|
||||
3. [Setup Git to sign commits](https://help.github.com/en/github/authenticating-to-github/signing-commits)
|
||||
4. [Setup GitHub to validate commits](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account)
|
||||
@@ -1,101 +0,0 @@
|
||||
# [DEPRECATED] Undefined is not an object evaluating `register_handler_fx`
|
||||
|
||||
## Deprecation note
|
||||
|
||||
This type of error should not occur anymore now that we require the namespace in the `fx.cljs` file.
|
||||
|
||||
It can however happen with other macros requiring a cljs namespace.
|
||||
|
||||
The general fix for that type of issue is to have two files for the namespace where your macros are defined, let's say for `my-project.my-macro` namespace you would have:
|
||||
- my_macro.cljs in which you need `(:require-macros my-project.my-macro)` and `(:require my-project.the-namespace-used-in-the-macro)`
|
||||
- my_macro.clj in which you define the macro
|
||||
|
||||
That way you don't need to use any magical call like `find-ns` or inline `require` with some kind of call only once switch (which was the root cause of another bug in ``defstyle`` macro because the compilation phase at which the evaluation of the switch is done was not properly considered).
|
||||
|
||||
You also want to make sure users are using the macro by using a aliased namespace defined in require statement rather than require-macro and refer to the macro directly. Otherwise it won't require the cljs file and the require statement of the namespace in the macroexpension might not be there.
|
||||
|
||||
## Stacktrace
|
||||
|
||||
```
|
||||
13:25:22, Requiring: hi-base32
|
||||
13:25:23, Possible Unhandled Promise Rejection (id: 0):
|
||||
TypeError: undefined is not an object (evaluating 'status_im.utils.handlers.register_handler_fx')
|
||||
eval code
|
||||
eval@[native code]
|
||||
asyncImportScripts$@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:200728:21
|
||||
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26567:23
|
||||
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26742:32
|
||||
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26567:23
|
||||
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26643:30
|
||||
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:26653:21
|
||||
tryCallOne@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3725:16
|
||||
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:3826:27
|
||||
_callTimer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:28405:17
|
||||
_callImmediatesPass@http://localhost:8081/index.bundle?pla<…>
|
||||
```
|
||||
|
||||
## Cause
|
||||
|
||||
- stacktrace mentions `register_handler_fx`,
|
||||
- common cause is when requires have been cleaned up and a require of `status-im.utils.handlers` namespace was removed because it looked like it was unused but was actually used through a fx/defn macro
|
||||
|
||||
## Solution
|
||||
|
||||
go through known faulty commit looking for deleted requires
|
||||
|
||||
|
||||
# Git "unable to access" errors during `yarn install`
|
||||
|
||||
## Description
|
||||
Developer updates `package.json` file with a new dependency using a GitHub URL. So it looks like this:
|
||||
```
|
||||
"react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#feature/exportKeyWithPath",
|
||||
```
|
||||
Afterwards, when running e.g. `make react-native-android`, they might see the following confusing error:
|
||||
```
|
||||
# macOS
|
||||
fatal: unable to access 'https://github.com/siphiuel/react-native-status-keycard.git/': SSL certificate problem: unable to get local issuer certificate
|
||||
# Linux
|
||||
fatal: unable to access 'https://github.com/status-im/react-native-status-keycard.git/': Could not resolve host: github.com
|
||||
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
|
||||
```
|
||||
|
||||
## Cause
|
||||
`yarn.lock` is not updated to be in sync with `package.json`.
|
||||
|
||||
## Solution
|
||||
Update yarn.lock file. In order to do this, perform the following steps on a clean `status-react` repo:
|
||||
```
|
||||
cd status-react
|
||||
ln -sf mobile/js_files/package.json .
|
||||
ln -sf mobile/js_files/yarn.lock .
|
||||
yarn install
|
||||
```
|
||||
and don't forget to commit updated `yarn.lock` together with `package.json`.
|
||||
|
||||
|
||||
# adb server/client version mismatch errors
|
||||
|
||||
## Description
|
||||
Running some adb commands, e.g. `adb devices` or `make android-ports` (in turn invokes `adb reverse`/`adb forward` commands) may display the following message:
|
||||
```
|
||||
adb server version (40) doesn't match this client (41); killing...
|
||||
```
|
||||
or the reverse
|
||||
```
|
||||
adb server version (41) doesn't match this client (40); killing...
|
||||
```
|
||||
|
||||
This might cause all kinds of difficult-to-debug errors, e.g.:
|
||||
- not being able to find the device through `adb devices`
|
||||
- `make run-android` throwing `com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: device 'device-id' not found.`
|
||||
- `make run-android` throwing `- Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 Unable to install /status-react/android/app/build/outputs/apk/debug/app-debug.apk com.android.ddmlib.InstallException: EOF`
|
||||
- dropped CLJS repl connections (that have been enabled previously with the help of `make android-ports`)
|
||||
|
||||
## Cause
|
||||
System's local adb and Nix's adb differ. As adb include of server/client processes, this can cause subtle version errors that cause adb to kill mismatching server processes.
|
||||
|
||||
## Solution
|
||||
Always use respective `make` commands, e.g. `make android-ports`, `make android-devices`, etc.
|
||||
|
||||
Alternatively, run adb commands only from `make shell TARGET=android` shell. Don't forget the `TARGET=android` env var setting - otherwise `adb` will still be selected from the system's default location. You can double-check this by running `which adb`.
|
||||
@@ -11,8 +11,21 @@ import re
|
||||
#
|
||||
|
||||
lib_deps = []
|
||||
create_aar_targets(glob(["libs/*.aar"]))
|
||||
create_jar_targets(glob(["libs/*.jar"]))
|
||||
for jarfile in glob(['libs/*.jar']):
|
||||
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
|
||||
lib_deps.append(':' + name)
|
||||
prebuilt_jar(
|
||||
name = name,
|
||||
binary_jar = jarfile,
|
||||
)
|
||||
|
||||
for aarfile in glob(['libs/*.aar']):
|
||||
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
|
||||
lib_deps.append(':' + name)
|
||||
android_prebuilt_aar(
|
||||
name = name,
|
||||
aar = aarfile,
|
||||
)
|
||||
|
||||
android_library(
|
||||
name = 'all-libs',
|
||||
|
||||
@@ -3,13 +3,10 @@ apply plugin: "com.android.application"
|
||||
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
|
||||
|
||||
import com.android.build.OutputFile
|
||||
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
|
||||
/**
|
||||
* The react.gradle file registers a task for each build variant:
|
||||
* - bundlePrJsAndAssets
|
||||
* - bundleDebugJsAndAssets
|
||||
* - bundleReleaseJsAndAssets
|
||||
* The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
|
||||
* and bundleReleaseJsAndAssets).
|
||||
* These basically call `react-native bundle` with the correct arguments during the Android build
|
||||
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
|
||||
* bundle directly from the development server. Below you can see all the possible configurations
|
||||
@@ -38,13 +35,6 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
* // bundleInPaidRelease: true,
|
||||
* // bundleInBeta: true,
|
||||
*
|
||||
* // whether to disable dev mode in custom build variants (by default only disabled in release)
|
||||
* // for example: to disable dev mode in the staging build type (if configured)
|
||||
* devDisabledInStaging: true,
|
||||
* // The configuration property can be in the following formats
|
||||
* // 'devDisabledIn${productFlavor}${buildType}'
|
||||
* // 'devDisabledIn${buildType}'
|
||||
*
|
||||
* // the root of your project, i.e. where "package.json" lives
|
||||
* root: "../../",
|
||||
*
|
||||
@@ -67,67 +57,35 @@ import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
|
||||
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
|
||||
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
|
||||
* // for example, you might want to remove it from here.
|
||||
* inputExcludes: ["android/**", "ios/**"],
|
||||
*
|
||||
* // override which node gets called and with what additional arguments
|
||||
* nodeExecutableAndArgs: ["node"],
|
||||
*
|
||||
* // supply additional arguments to the packager
|
||||
* extraPackagerArgs: []
|
||||
* inputExcludes: ["android/**", "ios/**"]
|
||||
* ]
|
||||
*/
|
||||
project.ext.react = [
|
||||
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
|
||||
entryFile: "index.android.js",
|
||||
enableHermes: true, // clean and rebuild if changing. NOTE: Hermes engine is required for Android 64-bit builds running on 64 devices, to guard against a hang in the UI thread after invoking status-go
|
||||
bundleInPr: true,
|
||||
inputExcludes: ["android/**", "ios/**", "react-native/**", "src/**", "test/**"]
|
||||
nodeExecutableAndArgs: ["node", "--max-old-space-size=4096"]
|
||||
]
|
||||
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
// configurations.all {
|
||||
// exclude group: 'com.facebook.react', module: 'react-native'
|
||||
// }
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
|
||||
/**
|
||||
* Set this to true to create two separate APKs instead of one:
|
||||
* - An APK that only works on ARM devices
|
||||
* - An APK that only works on x86 devices
|
||||
* The advantage is the size of the APK is reduced by about 4MB.
|
||||
* Upload all the APKs to the Play Store and people will download
|
||||
* the correct one based on the CPU architecture of their device.
|
||||
*/
|
||||
def enableSeparateBuildPerCPUArchitecture = false
|
||||
|
||||
/**
|
||||
* Run Proguard to shrink the Java bytecode in release builds.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
/**
|
||||
* The preferred build flavor of JavaScriptCore.
|
||||
*
|
||||
* For example, to use the international variant, you can use:
|
||||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||
*
|
||||
* The international variant includes ICU i18n library and necessary data
|
||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||
* give correct results when using with locales other than en-US. Note that
|
||||
* this variant is about 6MiB larger per architecture than default.
|
||||
*/
|
||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
|
||||
/**
|
||||
* Whether to enable the Hermes VM.
|
||||
*
|
||||
* This should be set on project.ext.react and mirrored here. If it is not set
|
||||
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||
*/
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
def getVersionCode = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("versionCode")) {
|
||||
return project.versionCode.toString().toInteger()
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine "bash", "../../scripts/version/build_no.sh"
|
||||
commandLine "git", "rev-list", "--count", "HEAD"
|
||||
standardOutput = stdOut
|
||||
errorOutput = System.err
|
||||
}
|
||||
return stdOut.toString().toInteger()
|
||||
}
|
||||
@@ -135,203 +93,108 @@ def getVersionCode = { ->
|
||||
|
||||
def getVersionName = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("releaseVersion")) {
|
||||
return project.releaseVersion
|
||||
exec {
|
||||
commandLine "git", "describe", "--tags", "--always", "--dirty=+"
|
||||
standardOutput = stdOut
|
||||
}
|
||||
version = new File('../VERSION').text
|
||||
return version.replaceAll("\\s","")
|
||||
return stdOut.toString().replaceAll("\\s","")
|
||||
}
|
||||
}
|
||||
|
||||
def getBuildUrl = { ->
|
||||
new ByteArrayOutputStream().withStream { stdOut ->
|
||||
if (project.hasProperty("buildUrl")) {
|
||||
return project.buildUrl
|
||||
}
|
||||
return 'Local Build'
|
||||
}
|
||||
}
|
||||
|
||||
/* check if environment variable exists for given variable name first */
|
||||
def getEnvOrConfig = { varName ->
|
||||
def val = System.getenv(varName) ? System.getenv(varName) : project.property(varName)
|
||||
return val
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
compileSdkVersion 24
|
||||
buildToolsVersion "23.0.1"
|
||||
|
||||
defaultConfig {
|
||||
applicationId "im.status.ethereum"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
minSdkVersion 18
|
||||
targetSdkVersion 23
|
||||
multiDexEnabled true
|
||||
versionCode getVersionCode()
|
||||
versionName getVersionName()
|
||||
missingDimensionStrategy 'react-native-camera', 'general'
|
||||
/* this needs to be empty if we want APKs split by ABIs */
|
||||
if (!getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()) {
|
||||
ndk {
|
||||
abiFilters getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||
}
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Arbitrary project metadata
|
||||
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
|
||||
**/
|
||||
project.ext {
|
||||
buildUrl = getBuildUrl()
|
||||
}
|
||||
/**
|
||||
* Fix for: (https://github.com/ReactiveX/RxJava/issues/4445)
|
||||
* Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
|
||||
* > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException:
|
||||
* Duplicate files copied in APK META-INF/rxjava.properties
|
||||
*/
|
||||
packagingOptions {
|
||||
exclude 'META-INF/rxjava.properties'
|
||||
exclude '/lib/mips64/**'
|
||||
exclude '/lib/armeabi/**'
|
||||
|
||||
|
||||
/** Fix for: Execution failed for task ':app:transformNativeLibsWithStripDebugSymbolForDebug'.
|
||||
* with recent version of ndk (17.0.4754217)
|
||||
*/
|
||||
doNotStrip '*/mips/*.so'
|
||||
doNotStrip '*/mips64/*.so'
|
||||
}
|
||||
dexOptions {
|
||||
jumboMode true
|
||||
javaMaxHeapSize "8g"
|
||||
javaMaxHeapSize "4g"
|
||||
}
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('debug.keystore')
|
||||
storePassword 'android'
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
}
|
||||
release {
|
||||
/* environment variables take precedence over gradle.properties file */
|
||||
storeFile file(getEnvOrConfig('KEYSTORE_PATH').replaceAll("~", System.properties['user.home']))
|
||||
storePassword getEnvOrConfig('KEYSTORE_PASSWORD')
|
||||
keyAlias getEnvOrConfig('KEYSTORE_ALIAS')
|
||||
keyPassword getEnvOrConfig('KEYSTORE_KEY_PASSWORD')
|
||||
storeFile file(STATUS_RELEASE_STORE_FILE)
|
||||
storePassword STATUS_RELEASE_STORE_PASSWORD
|
||||
keyAlias STATUS_RELEASE_KEY_ALIAS
|
||||
keyPassword STATUS_RELEASE_KEY_PASSWORD
|
||||
}
|
||||
}
|
||||
splits {
|
||||
abi {
|
||||
reset()
|
||||
enable getEnvOrConfig('ANDROID_ABI_SPLIT').toBoolean()
|
||||
include getEnvOrConfig('ANDROID_ABI_INCLUDE').split(";")
|
||||
universalApk true
|
||||
enable enableSeparateBuildPerCPUArchitecture
|
||||
universalApk false // If true, also generate a universal APK
|
||||
include "armeabi-v7a", "x86"
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
debuggable true
|
||||
versionNameSuffix "-SNAPSHOT"
|
||||
signingConfig signingConfigs.debug
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
versionNameSuffix "-SNAPSHOT"
|
||||
}
|
||||
release {
|
||||
// Caution! In production, you need to generate your own keystore file.
|
||||
// see https://facebook.github.io/react-native/docs/signed-apk-android.
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
pr {
|
||||
initWith release
|
||||
applicationIdSuffix ".pr"
|
||||
versionNameSuffix ".pr"
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
}
|
||||
}
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
// For each separate APK per architecture, set a unique version code as described here:
|
||||
|
||||
// https://developer.android.com/studio/build/configure-apk-splits.html
|
||||
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
|
||||
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
|
||||
def versionCodes = ["armeabi-v7a":1, "x86":2]
|
||||
def abi = output.getFilter(OutputFile.ABI)
|
||||
if (abi != null) { // null for the universal-debug, universal-release variants
|
||||
output.versionCodeOverride = versionCodes.get(abi) + defaultConfig.versionCode
|
||||
output.versionCodeOverride =
|
||||
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
// disable PNG optimization as for some reason it cannot be trusted to provide deterministic output (see https://f-droid.org/en/docs/Reproducible_Builds/)
|
||||
cruncherEnabled = false
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main { jniLibs.srcDirs 'libs' }
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
compile 'com.android.support:multidex:1.0.1'
|
||||
compile project(':react-native-http-bridge')
|
||||
compile project(':nfc-react-native')
|
||||
compile project(':instabug-reactnative')
|
||||
compile project(':react-native-splash-screen')
|
||||
compile project(':react-native-image-resizer')
|
||||
compile project(':react-native-dialogs')
|
||||
compile project(':react-native-randombytes')
|
||||
compile project(':react-native-android-sms-listener')
|
||||
compile project(':realm')
|
||||
compile project(':react-native-vector-icons')
|
||||
compile fileTree(dir: "libs", include: ["*.jar"])
|
||||
compile "com.android.support:appcompat-v7:23.0.1"
|
||||
compile "com.facebook.react:react-native:+" // From node_modules
|
||||
compile project(':react-native-contacts')
|
||||
compile project(':react-native-i18n')
|
||||
compile project(':react-native-linear-gradient')
|
||||
compile project(':react-native-camera')
|
||||
compile project(':react-native-status')
|
||||
compile project(':react-native-orientation')
|
||||
compile project(':react-native-fs')
|
||||
compile project(':react-native-image-crop-picker')
|
||||
compile project(':react-native-webview-bridge')
|
||||
compile project(':reactnativemapboxgl')
|
||||
compile 'testfairy:testfairy-android-sdk:1.+@aar'
|
||||
compile project(':react-native-config')
|
||||
|
||||
if (enableHermes) {
|
||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||
releaseImplementation files(hermesPath + "hermes-release.aar")
|
||||
prImplementation files(hermesPath + "hermes-release.aar")
|
||||
} else {
|
||||
implementation jscFlavor
|
||||
}
|
||||
|
||||
// react-native-screens
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
|
||||
|
||||
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
|
||||
implementation project(':react-native-dialogs')
|
||||
// Force using exact RN version instead of relying on gradle dependency resolution
|
||||
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
|
||||
// NOTE: Uncomment if building RN from a fork
|
||||
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
|
||||
implementation project(':react-native-status')
|
||||
implementation project(':react-native-webview-bridge')
|
||||
implementation project(':react-native-status-keycard')
|
||||
implementation 'com.github.status-im:function:0.0.1'
|
||||
implementation 'com.facebook.fresco:fresco:2.0.0'
|
||||
implementation 'com.facebook.fresco:animated-gif:2.0.0'
|
||||
compile fileTree(dir: "node_modules/realm/android/libs", include: ["*.jar"])
|
||||
}
|
||||
|
||||
// Run this once to be able to run the application with BUCK
|
||||
// puts all compile dependencies into folder libs for BUCK to use
|
||||
|
||||
task hemroidBuild(type: Exec) {
|
||||
def rootDir = project.rootDir
|
||||
def localProperties = new File(rootDir, "local.properties")
|
||||
|
||||
def ndkDir = System.env.ANDROID_NDK
|
||||
if (localProperties.exists()) {
|
||||
Properties properties = new Properties()
|
||||
localProperties.withInputStream { instr ->
|
||||
properties.load(instr)
|
||||
}
|
||||
ndkDir = properties.getProperty('ndk.dir')
|
||||
}
|
||||
executable "$ndkDir/ndk-build"
|
||||
task copyDownloadableDepsToLibs(type: Copy) {
|
||||
from configurations.compile
|
||||
into 'libs'
|
||||
}
|
||||
|
||||
preBuild.dependsOn hemroidBuild
|
||||
|
||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := status-logs
|
||||
LOCAL_SRC_FILES := Log.c
|
||||
|
||||
LOCAL_CPPFLAGS := -std=c++11 -fexceptions -I$(LOCAL_PATH)/include
|
||||
LOCAL_LDFLAGS := -llog
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
@@ -1,5 +0,0 @@
|
||||
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
|
||||
APP_LDFLAGS := -Wl,--build-id=none
|
||||
APP_PLATFORM := android-18
|
||||
APP_STL := c++_static
|
||||
NDK_TOOLCHAIN_VERSION=clang
|
||||
@@ -1,39 +0,0 @@
|
||||
// https://codelab.wordpress.com/2014/11/03/how-to-use-standard-output-streams-for-logging-in-android-apps/
|
||||
#include <jni.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <android/log.h>
|
||||
|
||||
static int pfd[2];
|
||||
static pthread_t thr;
|
||||
|
||||
static void *thread_func(void* param)
|
||||
{
|
||||
ssize_t rdsz;
|
||||
char buf[128];
|
||||
while((rdsz = read(pfd[0], buf, sizeof buf - 1)) > 0) {
|
||||
if(buf[rdsz - 1] == '\n') --rdsz;
|
||||
buf[rdsz] = 0; /* add null-terminator */
|
||||
__android_log_write(ANDROID_LOG_DEBUG, "StatusNativeLogs", buf);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
||||
{
|
||||
/* make stdout line-buffered and stderr unbuffered */
|
||||
setvbuf(stdout, 0, _IOLBF, 0);
|
||||
setvbuf(stderr, 0, _IONBF, 0);
|
||||
|
||||
/* create the pipe and redirect stdout and stderr */
|
||||
pipe(pfd);
|
||||
dup2(pfd[1], 1);
|
||||
dup2(pfd[1], 2);
|
||||
|
||||
/* spawn the logging thread */
|
||||
if(pthread_create(&thr, 0, thread_func, 0) == -1)
|
||||
return JNI_VERSION_1_6; // fail silently
|
||||
pthread_detach(thr);
|
||||
|
||||
return JNI_VERSION_1_6;
|
||||
}
|
||||
@@ -9,6 +9,13 @@
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Disabling obfuscation is useful if you collect stack traces from production crashes
|
||||
# (unless you are using a system that supports de-obfuscate the stack traces).
|
||||
-dontobfuscate
|
||||
@@ -43,10 +50,6 @@
|
||||
|
||||
-dontwarn com.facebook.react.**
|
||||
|
||||
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
|
||||
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
|
||||
-dontwarn android.text.StaticLayout
|
||||
|
||||
# okhttp
|
||||
|
||||
-keepattributes Signature
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
def config = project.hasProperty("react") ? project.react : [];
|
||||
|
||||
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
|
||||
def entryFile = config.entryFile ?: "index.android.js"
|
||||
|
||||
// because elvis operator
|
||||
def elvisFile(thing) {
|
||||
return thing ? file(thing) : null;
|
||||
}
|
||||
|
||||
def reactRoot = elvisFile(config.root) ?: file("../../")
|
||||
def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"]
|
||||
|
||||
void runBefore(String dependentTaskName, Task task) {
|
||||
Task dependentTask = tasks.findByPath(dependentTaskName);
|
||||
if (dependentTask != null) {
|
||||
dependentTask.dependsOn task
|
||||
}
|
||||
}
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
// Grab all build types and product flavors
|
||||
def buildTypes = android.buildTypes.collect { type -> type.name }
|
||||
def productFlavors = android.productFlavors.collect { flavor -> flavor.name }
|
||||
|
||||
// When no product flavors defined, use empty
|
||||
if (!productFlavors) productFlavors.add('')
|
||||
|
||||
productFlavors.each { productFlavorName ->
|
||||
buildTypes.each { buildTypeName ->
|
||||
// Create variant and source names
|
||||
def sourceName = "${buildTypeName}"
|
||||
def targetName = "${sourceName.capitalize()}"
|
||||
if (productFlavorName) {
|
||||
sourceName = "${productFlavorName}${targetName}"
|
||||
}
|
||||
|
||||
// React js bundle directories
|
||||
def jsBundleDirConfigName = "jsBundleDir${targetName}"
|
||||
def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
|
||||
file("$buildDir/intermediates/assets/${sourceName}")
|
||||
|
||||
def resourcesDirConfigName = "jsBundleDir${targetName}"
|
||||
def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
|
||||
file("$buildDir/intermediates/res/merged/${sourceName}")
|
||||
def jsBundleFile = file("$jsBundleDir/$bundleAssetName")
|
||||
|
||||
// Bundle task name for variant
|
||||
def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets"
|
||||
|
||||
def currentBundleTask = tasks.create(
|
||||
name: bundleJsAndAssetsTaskName,
|
||||
type: Exec) {
|
||||
group = "react"
|
||||
description = "bundle JS and assets for ${targetName}."
|
||||
|
||||
// Create dirs if they are not there (e.g. the "clean" task just ran)
|
||||
doFirst {
|
||||
jsBundleDir.mkdirs()
|
||||
resourcesDir.mkdirs()
|
||||
}
|
||||
|
||||
// Set up inputs and outputs so gradle can cache the result
|
||||
inputs.files fileTree(dir: reactRoot, excludes: inputExcludes)
|
||||
outputs.dir jsBundleDir
|
||||
outputs.dir resourcesDir
|
||||
|
||||
// Set up the call to the react-native cli
|
||||
workingDir reactRoot
|
||||
|
||||
// Set up dev mode
|
||||
def devEnabled = !targetName.toLowerCase().contains("release")
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
|
||||
"--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
|
||||
} else {
|
||||
commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}",
|
||||
"--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir
|
||||
}
|
||||
|
||||
enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release")
|
||||
}
|
||||
|
||||
// Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process
|
||||
currentBundleTask.dependsOn("merge${targetName}Resources")
|
||||
currentBundleTask.dependsOn("merge${targetName}Assets")
|
||||
|
||||
runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask)
|
||||
runBefore("processX86${targetName}Resources", currentBundleTask)
|
||||
runBefore("processUniversal${targetName}Resources", currentBundleTask)
|
||||
runBefore("process${targetName}Resources", currentBundleTask)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
|
||||
</manifest>
|
||||
|
Before Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 21 KiB |
@@ -1,3 +0,0 @@
|
||||
<resources>
|
||||
<string name="app_name">Status Debug</string>
|
||||
</resources>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">localhost</domain>
|
||||
<domain includeSubdomains="true">10.0.3.2</domain>
|
||||
<domain includeSubdomains="true">10.0.2.2</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
@@ -4,85 +4,56 @@
|
||||
package="im.status.ethereum">
|
||||
|
||||
<!-- non-dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_PROFILE" />
|
||||
|
||||
<!-- dangerous permissions -->
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
|
||||
|
||||
<uses-permission android:name="com.android.vending.BILLING" />
|
||||
|
||||
<!-- these permissions should be removed -->
|
||||
<!-- react-native-orientation adds an unnecessary permission; here we remove it -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove"/>
|
||||
<!-- react-native-contacts -->
|
||||
<uses-permission android:name="android.permission.WRITE_CONTACTS" tools:node="remove"/>
|
||||
<!-- react-native-camera -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/>
|
||||
<uses-permission android:name="android.permission.RECORD_VIDEO" tools:node="remove"/>
|
||||
<!-- React Native unnecessary permissions (https://github.com/facebook/react-native/issues/5886) -->
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>
|
||||
|
||||
<application
|
||||
tools:replace="android:allowBackup"
|
||||
android:allowBackup="false"
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:theme="@style/AppTheme"
|
||||
android:name=".MainApplication"
|
||||
android:largeHeap="true"
|
||||
android:usesCleartextTraffic="true">
|
||||
android:largeHeap="true">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:resizeableActivity="false"
|
||||
android:launchMode="singleTask">
|
||||
android:resizeableActivity="false">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
<intent-filter android:label="@string/app_name">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="app-settings"
|
||||
android:host="notification" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="http" android:host="join.status.im" />
|
||||
<data android:scheme="https" android:host="join.status.im" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="status-im" />
|
||||
<data android:scheme="ethereum" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<service
|
||||
android:name=".module.StatusService"
|
||||
android:enabled="true"
|
||||
android:exported="true"/>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
|
||||
<service android:name="im.status.ethereum.module.ForegroundService"></service>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
tools:replace="android:authorities">
|
||||
<meta-data
|
||||
tools:replace="android:resource"
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_provider_paths" />
|
||||
</provider>
|
||||
<service android:name="com.mapbox.mapboxsdk.telemetry.TelemetryService"/>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
||||
@@ -1,50 +1,34 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import android.annotation.TargetApi;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.provider.Settings;
|
||||
import android.os.Bundle;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
|
||||
import com.facebook.react.ReactFragmentActivity;
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.modules.core.PermissionListener;
|
||||
import org.devio.rn.splashscreen.SplashScreen;
|
||||
import com.cboy.rn.splashscreen.SplashScreen;
|
||||
import com.testfairy.TestFairy;
|
||||
|
||||
import java.util.Properties;
|
||||
import im.status.ethereum.module.StatusThreadPoolExecutor;
|
||||
|
||||
public class MainActivity extends ReactFragmentActivity
|
||||
implements ActivityCompat.OnRequestPermissionsResultCallback{
|
||||
|
||||
|
||||
@Nullable private PermissionListener mPermissionListener;
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
private static void registerUncaughtExceptionHandler(final Context context) {
|
||||
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
|
||||
@Override
|
||||
public void uncaughtException(final Thread thread, final Throwable t) {
|
||||
// High priority, so don't use StatusThreadPoolExecutor
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -84,30 +68,8 @@ public class MainActivity extends ReactFragmentActivity
|
||||
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
|
||||
}
|
||||
|
||||
private Intent createNotificationSettingsIntent() {
|
||||
final Intent intent = new Intent();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
|
||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
|
||||
} else {
|
||||
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
|
||||
intent.addCategory(Intent.CATEGORY_DEFAULT);
|
||||
intent.setData(Uri.parse("package:" + getPackageName()));
|
||||
}
|
||||
return intent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewIntent(final Intent intent) {
|
||||
super.onNewIntent(intent);
|
||||
if (intent.getDataString() != null && intent.getData().getScheme().startsWith("app-settings")) {
|
||||
startActivity(createNotificationSettingsIntent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
// Make sure we get an Alert for every uncaught exceptions
|
||||
registerUncaughtExceptionHandler(MainActivity.this);
|
||||
|
||||
@@ -115,12 +77,15 @@ public class MainActivity extends ReactFragmentActivity
|
||||
final ActivityManager activityManager = getActivityManager();
|
||||
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
|
||||
|
||||
setSecureFlag();
|
||||
SplashScreen.show(this, true);
|
||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||
super.onCreate(null);
|
||||
|
||||
if (!shouldShowRootedNotification()) {
|
||||
SplashScreen.show(this);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
if(BuildConfig.TESTFAIRY_ENABLED == "1") {
|
||||
TestFairy.begin(this, "969f6c921cb435cea1d41d1ea3f5b247d6026d55");
|
||||
}
|
||||
|
||||
if (!RootUtil.isDeviceRooted()) {
|
||||
configureStatus();
|
||||
} else {
|
||||
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)
|
||||
@@ -128,7 +93,6 @@ public class MainActivity extends ReactFragmentActivity
|
||||
.setPositiveButton(getResources().getString(R.string.root_okay), new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
rejectRootedNotification();
|
||||
dialog.dismiss();
|
||||
configureStatus();
|
||||
}
|
||||
@@ -151,15 +115,6 @@ public class MainActivity extends ReactFragmentActivity
|
||||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
System.loadLibrary("status-logs");
|
||||
}
|
||||
};
|
||||
|
||||
StatusThreadPoolExecutor.getInstance().execute(r);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,66 +138,4 @@ public class MainActivity extends ReactFragmentActivity
|
||||
intent.putExtra("newConfig", newConfig);
|
||||
this.sendBroadcast(intent);
|
||||
}
|
||||
|
||||
private static final String REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification";
|
||||
private static final Integer FREQUENCY_OF_REMINDER_IN_PERCENT = 5;
|
||||
|
||||
private boolean shouldShowRootedNotification() {
|
||||
if (RootUtil.isDeviceRooted()) {
|
||||
if (userRejectedRootedNotification()) {
|
||||
return ((Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT);
|
||||
} else return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean userRejectedRootedNotification() {
|
||||
SharedPreferences preferences = getPreferences(0);
|
||||
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false);
|
||||
}
|
||||
|
||||
private void rejectRootedNotification() {
|
||||
SharedPreferences preferences = getPreferences(0);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
private void setSecureFlag() {
|
||||
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
} else {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.M)
|
||||
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
|
||||
mPermissionListener = listener;
|
||||
requestPermissions(permissions, requestCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||
if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
|
||||
mPermissionListener = null;
|
||||
}
|
||||
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
// Permission has been granted. Start camera preview Activity.
|
||||
com.github.alinz.reactnativewebviewbridge.WebViewBridgeManager.grantAccess(requestCode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ReactActivityDelegate createReactActivityDelegate() {
|
||||
return new ReactActivityDelegate(this, getMainComponentName()) {
|
||||
@Override
|
||||
protected ReactRootView createRootView() {
|
||||
return new RNGestureHandlerEnabledRootView(MainActivity.this);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,35 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
import android.util.Log;
|
||||
import com.facebook.react.PackageList;
|
||||
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
|
||||
import com.facebook.react.bridge.JavaScriptExecutorFactory;
|
||||
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
import com.BV.LinearGradient.LinearGradientPackage;
|
||||
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import com.bitgo.randombytes.RandomBytesPackage;
|
||||
import com.cboy.rn.splashscreen.SplashScreenReactPackage;
|
||||
import com.centaurwarchief.smslistener.SmsListenerPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
import com.facebook.react.shell.MainReactPackage;
|
||||
import com.github.alinz.reactnativewebviewbridge.WebViewBridgePackage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import im.status.ethereum.keycard.RNStatusKeycardPackage;
|
||||
import com.github.yamill.orientation.OrientationPackage;
|
||||
import com.i18n.reactnativei18n.ReactNativeI18n;
|
||||
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
|
||||
import com.lwansbrough.RCTCamera.RCTCameraPackage;
|
||||
import com.oblador.vectoricons.VectorIconsPackage;
|
||||
import com.reactnative.ivpusic.imagepicker.PickerPackage;
|
||||
import com.rnfs.RNFSPackage;
|
||||
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
|
||||
import es.tiarg.nfcreactnative.NfcReactNativePackage;
|
||||
import fr.bamlab.rnimageresizer.ImageResizerPackage;
|
||||
import im.status.ethereum.module.StatusPackage;
|
||||
import io.realm.react.RealmReactPackage;
|
||||
import me.alwx.HttpServer.HttpServerReactPackage;
|
||||
import com.mapbox.reactnativemapboxgl.ReactNativeMapboxGLPackage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class MainApplication extends MultiDexApplication implements ReactApplication {
|
||||
|
||||
@@ -28,18 +41,35 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
packages.add(statusPackage);
|
||||
packages.add(new ReactNativeDialogsPackage());
|
||||
packages.add(new RNStatusKeycardPackage());
|
||||
packages.add(new WebViewBridgePackage(BuildConfig.DEBUG_WEBVIEW == "1"));
|
||||
return packages;
|
||||
}
|
||||
List<ReactPackage> packages = new ArrayList<ReactPackage>(Arrays.asList(
|
||||
new MainReactPackage(),
|
||||
new HttpServerReactPackage(),
|
||||
new NfcReactNativePackage(),
|
||||
new SplashScreenReactPackage(),
|
||||
new StatusPackage(BuildConfig.DEBUG),
|
||||
new RealmReactPackage(),
|
||||
new VectorIconsPackage(),
|
||||
new ReactNativeContacts(),
|
||||
new ReactNativeI18n(),
|
||||
new RandomBytesPackage(),
|
||||
new LinearGradientPackage(),
|
||||
new RCTCameraPackage(),
|
||||
new SmsListenerPackage(),
|
||||
new OrientationPackage(),
|
||||
new RNFSPackage(),
|
||||
new ReactNativeDialogsPackage(),
|
||||
new ImageResizerPackage(),
|
||||
new PickerPackage(),
|
||||
new WebViewBridgePackage(BuildConfig.DEBUG),
|
||||
new ReactNativeMapboxGLPackage(),
|
||||
new ReactNativeConfigPackage()
|
||||
));
|
||||
|
||||
@Override
|
||||
protected String getJSMainModuleName() {
|
||||
return "index.android";
|
||||
if (!BuildConfig.DEBUG) {
|
||||
packages.add(new RNInstabugReactnativePackage("b239f82a9cb00464e4c72cc703e6821e", MainApplication.this, "shake"));
|
||||
}
|
||||
|
||||
return packages;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,9 +78,4 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 142 B |
|
Before Width: | Height: | Size: 155 B |
|
Before Width: | Height: | Size: 145 B |
|
Before Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 350 B |
|
Before Width: | Height: | Size: 386 B |
|
Before Width: | Height: | Size: 281 B |
|
Before Width: | Height: | Size: 141 B |
|
Before Width: | Height: | Size: 190 B |
|
Before Width: | Height: | Size: 260 B |