Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
RN 0.61.5
Browse files Browse the repository at this point in the history
  • Loading branch information
bryvin authored and moughxyz committed Jan 7, 2020
1 parent 6fbdf18 commit b922c59
Show file tree
Hide file tree
Showing 65 changed files with 6,188 additions and 4,891 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
73 changes: 39 additions & 34 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; 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
.*/Libraries/react-native/React.js
; These should not be required directly
; require from fbjs/lib instead: require('fbjs/lib/warning')
node_modules/warning/.*

; Ignore polyfills
.*/Libraries/polyfills/.*
; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

; Ignore metro
.*/node_modules/metro/.*
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

Expand All @@ -32,39 +31,45 @@ emoji=true
esproposal.optional_chaining=enable
esproposal.nullish_coalescing=enable

module.system=haste
module.system.haste.use_name_reducers=true
# get basename
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
# strip .js or .js.flow suffix
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
# strip .ios suffix
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
module.system.haste.paths.blacklist=.*/__tests__/.*
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.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

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'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js
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'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

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\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(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
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn
signature-verification-failure=warn
deprecated-utility=error
[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.92.0
^0.105.0
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
.xcworkspace

# Android/IntelliJ
#
Expand All @@ -40,6 +40,7 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
!debug.keystore

android/app/release
android-release.bundle
Expand All @@ -62,3 +63,7 @@ ios-release.bundle.map

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
/ios/StandardNotes.xcodeproj/project.xcworkspace
22 changes: 8 additions & 14 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
[submodule "vendor/react-native-actionsheet"]
path = vendor/react-native-actionsheet
url = [email protected]:mobitar/react-native-actionsheet.git
url = [email protected]:standardnotes/react-native-actionsheet.git
[submodule "vendor/react-native-aes"]
path = vendor/react-native-aes
url = [email protected]:mobitar/react-native-aes.git
url = [email protected]:standardnotes/react-native-aes.git
[submodule "vendor/react-native-mail"]
path = vendor/react-native-mail
url = [email protected]:mobitar/react-native-mail.git
url = [email protected]:standardnotes/react-native-mail.git
[submodule "vendor/react-native-fingerprint-scanner"]
path = vendor/react-native-fingerprint-scanner
url = [email protected]:mobitar/react-native-fingerprint-scanner.git
url = [email protected]:standardnotes/react-native-fingerprint-scanner.git
[submodule "vendor/react-native-flag-secure-android"]
path = vendor/react-native-flag-secure-android
url = [email protected]:mobitar/react-native-flag-secure-android.git
[submodule "vendor/react-native-navigation"]
path = vendor/react-native-navigation
url = [email protected]:mobitar/react-native-navigation.git
url = [email protected]:standardnotes/react-native-flag-secure-android.git
[submodule "vendor/react-native-fab"]
path = vendor/react-native-fab
url = [email protected]:mobitar/React-Native-FAB.git
url = [email protected]:standardnotes/React-Native-FAB.git
[submodule "vendor/react-native-search-box"]
path = vendor/react-native-search-box
url = [email protected]:mobitar/react-native-search-box.git
url = [email protected]:standardnotes/react-native-search-box.git
[submodule "vendor/react-native-alternate-icons"]
path = vendor/react-native-alternate-icons
url = [email protected]:mobitar/react-native-alternate-icons.git
url = [email protected]:standardnotes/react-native-alternate-icons.git
[submodule "vendor/standard-notes-rn"]
path = vendor/standard-notes-rn
url = [email protected]:standardnotes/standard-notes-rn.git
[submodule "vendor/TrustKit"]
path = vendor/TrustKit
url = [email protected]:datatheorem/TrustKit.git
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ This is a React Native implementation of Standard Notes. React Native allows us

### Building the Project

Clone the project, then:
Clone the project, then initialize the project with required files:

1. `git submodule update --init`
2. `npm install`
1. `npm run init`
3. `react-native run-ios` or `react-native run-android`

Note: You may need to set up an SSH key on GitHub to pull in submodules. Please follow [these instructions](https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/) to do so.
Expand Down
File renamed without changes.
73 changes: 57 additions & 16 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ apply plugin: "com.android.application"
import com.android.build.OutputFile

project.ext.react = [
entryFile: "index.js"
entryFile: "index.js",
enableHermes: false // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand All @@ -23,6 +24,27 @@ def enableSeparateBuildPerCPUArchitecture = false
*/
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);

android {
compileSdkVersion rootProject.ext.compileSdkVersion

Expand All @@ -31,8 +53,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion

versionCode 3000170
versionName "3.0.17"
versionCode 3000180
versionName "3.0.18"

multiDexEnabled true

Expand All @@ -47,6 +69,12 @@ android {
}

signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
Expand All @@ -66,7 +94,15 @@ android {
}
}
buildTypes {
all {
matchingFallbacks = ['release', 'debug']
}
debug {
signingConfig signingConfigs.debug
matchingFallbacks = ['release', 'debug']
}
release {
matchingFallbacks = ['release', 'debug']
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
Expand All @@ -76,8 +112,8 @@ android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
Expand All @@ -88,27 +124,29 @@ android {
}

dependencies {
compile project(':@react-native-community_async-storage')
compile project(':react-native-webview')
compile project(':react-native-file-viewer')
compile project(':react-native-fs')
compile project(':react-native-gesture-handler')

implementation fileTree(dir: "libs", include: ["*.jar"])

implementation project(':bugsnag-react-native')
implementation 'com.google.android.material:material:1.0.0'
implementation "com.facebook.react:react-native:+" // From node_modules

implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'

implementation project(':RNMail')
implementation project(':SNTextView')
implementation project(':standard-notes-rn')
implementation project(':react-native-keychain')
implementation project(':react-native-vector-icons')
implementation project(':react-native-aes-crypto')
implementation project(':react-native-fingerprint-scanner')
implementation project(':react-native-flag-secure-android')

implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.android.support:design:27.1.0'
implementation "com.facebook.react:react-native:+" // From node_modules
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}

// Run this once to be able to run the application with BUCK
Expand All @@ -118,6 +156,9 @@ task copyDownloadableDepsToLibs(type: Copy) {
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
applyNativeModulesAppBuildGradle(project)

//configurations.all {
// exclude group: 'com.facebook.react', module: 'react-native'
//}
Binary file added android/app/debug.keystore
Binary file not shown.
7 changes: 0 additions & 7 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@

# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class MainActivity extends ReactActivity {

@Override
protected String getMainComponentName() {
return "StandardNotes";
return "StandardNotes";
}

@Override
Expand Down
Loading

0 comments on commit b922c59

Please sign in to comment.