diff --git a/.circleci/config.yml b/.circleci/config.yml index a87377288..0b6315e66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,7 @@ executors: NODE_ENV: production BABEL_ENV: production macos: - xcode: "12.0.0" + xcode: "12.1.0" working_directory: ~/mattermost-mobile shell: /bin/bash --login -o pipefail @@ -550,14 +550,14 @@ workflows: - test filters: branches: - only: /^build-pr-.*/ + only: /^(build|android)-pr-.*/ - build-ios-pr: context: mattermost-mobile-ios-pr requires: - test filters: branches: - only: /^build-pr-.*/ + only: /^(build|ios)-pr-.*/ - build-android-unsigned: context: mattermost-mobile-unsigned diff --git a/.eslintrc.json b/.eslintrc.json index a02682364..f95474148 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,8 @@ ], "parser": "@typescript-eslint/parser", "plugins": [ - "mattermost", - "@typescript-eslint" + "@typescript-eslint", + "mattermost" ], "settings": { "react": { diff --git a/.flowconfig b/.flowconfig index 757564ae8..9034f7727 100644 --- a/.flowconfig +++ b/.flowconfig @@ -8,10 +8,6 @@ ; 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 @@ -30,6 +26,8 @@ emoji=true esproposal.optional_chaining=enable esproposal.nullish_coalescing=enable +exact_by_default=true + module.file_ext=.js module.file_ext=.json module.file_ext=.ios.js @@ -44,10 +42,6 @@ suppress_type=$FlowFixMe suppress_type=$FlowFixMeProps suppress_type=$FlowFixMeState -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError - [lints] sketchy-null-number=warn sketchy-null-mixed=warn @@ -59,7 +53,6 @@ unsafe-getters-setters=warn inexact-spread=warn unnecessary-invariant=warn signature-verification-failure=warn -deprecated-utility=error [strict] deprecated-type @@ -71,4 +64,4 @@ untyped-import untyped-type-import [version] -^0.122.0 +^0.137.0 diff --git a/.gitattributes b/.gitattributes index 5b8397637..59b845bf9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ -*.pbxproj -text - -# specific for windows script files -*.bat text eol=crlf +# Windows files should use crlf line endings +# https://help.github.com/articles/dealing-with-line-endings/ +*.bat text eol=crlf \ No newline at end of file diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 000000000..31354ec13 --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..ac95b74a5 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +sh ./scripts/pre-commit.sh diff --git a/android/app/build.gradle b/android/app/build.gradle index df5a46219..b4c640e19 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -191,6 +191,10 @@ android { targetCompatibility 1.8 } + packagingOptions { + pickFirst '**/*.so' + } + } repositories { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 85bf18b6f..0063cf4f3 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -4,5 +4,10 @@ - + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 20d5c1cd8..f5796bb53 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -50,7 +50,6 @@ - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 8918ad4c7..53ffe603c 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,7 +1,7 @@ -