Skip to content

Commit

Permalink
Merge pull request #87 from VerusCoin/dev
Browse files Browse the repository at this point in the history
0.3.0
  • Loading branch information
Asherda authored Nov 1, 2021
2 parents c2bb4c2 + 473bad3 commit 173db6a
Show file tree
Hide file tree
Showing 340 changed files with 36,008 additions and 4,618 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',
};
66 changes: 66 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

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

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

[include]

[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/

[options]
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

munge_underscores=true

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

[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
unnecessary-invariant=warn
signature-verification-failure=warn

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.137.0
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows files should use crlf line endings
# https://help.github.com/articles/dealing-with-line-endings/
*.bat text eol=crlf
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
arrowParens: 'avoid',
};
23 changes: 19 additions & 4 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
/**
* @format
* @flow strict-local
*/
import React from 'react';
import VerusMobile from './src/VerusMobile'
import store from './src/store'
import { Provider } from 'react-redux'
import { Provider as PaperProvider, DefaultTheme } from 'react-native-paper';
import { NavigationContainer } from '@react-navigation/native';
import BigNumber from 'bignumber.js';
import Colors from './src/globals/colors';

BigNumber.set({EXPONENTIAL_AT: 1000000});

const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: Colors.primaryColor,
accent: Colors.verusGreenColor,
},
};

export default class App extends React.Component {
render() {
return (
<Provider store={store}>
<NavigationContainer>
<PaperProvider theme={theme}>
<Provider store={store}>
<VerusMobile/>
</NavigationContainer>
</Provider>
</Provider>
</PaperProvider>
);
}
}
2 changes: 1 addition & 1 deletion __mocks__/@react-native-community/async-storage.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default from '@react-native-community/async-storage/jest/async-storage-mock'
export default from '@react-native-async-storage/async-storage/jest/async-storage-mock'
3 changes: 3 additions & 0 deletions _editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Windows files
[*.bat]
end_of_line = crlf
18 changes: 4 additions & 14 deletions android/app/_BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,13 @@
# - `buck install -r android/app` - compile, install and run application
#

load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")

lib_deps = []

for jarfile in glob(['libs/*.jar']):
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
lib_deps.append(':' + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)
create_aar_targets(glob(["libs/*.aar"]))

for aarfile in glob(['libs/*.aar']):
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
lib_deps.append(':' + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)
create_jar_targets(glob(["libs/*.jar"]))

android_library(
name = "all-libs",
Expand Down
50 changes: 24 additions & 26 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apply plugin: "com.android.application"
import com.android.build.OutputFile

def versionMajor = 0
def versionMinor = 2
def versionRevision = 2
def versionMinor = 3
def versionRevision = 0
def versionBuild = 0

def keystorePropertiesFile = rootProject.file("keystore.properties");
Expand Down Expand Up @@ -80,7 +80,6 @@ def keystorePropertiesFile = rootProject.file("keystore.properties");
*/

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

Expand Down Expand Up @@ -123,23 +122,21 @@ def jscFlavor = 'org.webkit:android-jsc:+'
def enableHermes = project.ext.react.get("enableHermes", false);

android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
ndkVersion rootProject.ext.ndkVersion

defaultConfig {
applicationId "com.verusmobile"
minSdkVersion 21
targetSdkVersion 29
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "com.verusmobile"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode versionMajor * 10000 + versionMinor * 1000 + versionRevision * 100 + versionBuild
missingDimensionStrategy 'react-native-camera', 'general'
if (versionBuild > 0) {
versionName "${versionMajor}.${versionMinor}.${versionRevision}-beta-${versionBuild}"
versionName "${versionMajor}.${versionMinor}.${versionRevision}-${versionBuild}"
} else {
versionName "${versionMajor}.${versionMinor}.${versionRevision}-beta"
}
ndk {
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
versionName "${versionMajor}.${versionMinor}.${versionRevision}"
}
}
configurations {
Expand All @@ -149,13 +146,6 @@ android {
}
}

dexOptions
{
incremental false
javaMaxHeapSize "2048M"
preDexLibraries = false
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -207,14 +197,22 @@ android {

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.0.0'
//noinspection GradleDynamicVersion
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.android.support:multidex:1.0.3'
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}

if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";


debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
Expand All @@ -233,7 +231,7 @@ dependencies {
force = true
}

implementation('org.bouncycastle:bcprov-jdk15on:1.68') {
implementation('org.bouncycastle:bcprov-jdk15on:1.69') {
force = true
}

Expand Down
19 changes: 19 additions & 0 deletions android/app/build_defs.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Helper definitions to glob .aar and .jar targets"""

def create_aar_targets(aarfiles):
for aarfile in aarfiles:
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
lib_deps.append(":" + name)
android_prebuilt_aar(
name = name,
aar = aarfile,
)

def create_jar_targets(jarfiles):
for jarfile in jarfiles:
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
lib_deps.append(":" + name)
prebuilt_jar(
name = name,
binary_jar = jarfile,
)
60 changes: 0 additions & 60 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,63 +8,3 @@
# http://developer.android.com/guide/developing/tools/proguard.html

# 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

# React Native

# Keep our interfaces so they can be used by other ProGuard rules.
# See http://sourceforge.net/p/proguard/bugs/466/
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip

# Do not strip any method/class that is annotated with @DoNotStrip
-keep @com.facebook.proguard.annotations.DoNotStrip class *
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.proguard.annotations.DoNotStrip *;
@com.facebook.common.internal.DoNotStrip *;
}

-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
void set*(***);
*** get*();
}

-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }

-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
-keepattributes *Annotation*
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**

# okio

-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
42 changes: 42 additions & 0 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.verusmobile">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>

<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning"
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:screenOrientation="portrait"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:testOnly="false">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:name=".SplashActivity"
android:screenOrientation="portrait"
android:theme="@style/SplashTheme"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Loading

0 comments on commit 173db6a

Please sign in to comment.