Skip to content

Commit

Permalink
Merge pull request #77 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Asherda authored Jun 7, 2021
2 parents 8184196 + 2a6c84a commit c2bb4c2
Show file tree
Hide file tree
Showing 104 changed files with 7,303 additions and 4,845 deletions.
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Android:debug:
tags: ["Mobile"]
stage: build
script:
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.json
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.android.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.android.json
- yarn install
- yarn run bundle-android
- cd android && ./gradlew assembleDebug
Expand All @@ -35,8 +35,8 @@ Android:release:
RELEASE: 1
stage: build
script:
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.json
- sed -i -e "s/PUT_KEY_HERE/${ETHERSCAN_API_KEY}/g" env/main.android.json
- sed -i -e "s/PUT_ID_HERE/${INFURA_PROJECT_ID}/g" env/main.android.json
- yarn install
- cd android
- echo ${KEYSTORE} | xxd -r -p - > app/${MYAPP_RELEASE_STORE_FILE}
Expand Down
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.19.0
ignore: {}
patch: {}
27 changes: 25 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.android.build.OutputFile

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

def keystorePropertiesFile = rootProject.file("keystore.properties");
Expand Down Expand Up @@ -145,6 +145,7 @@ android {
configurations {
all {
exclude group: 'org.json', module: 'json'
exclude group: 'org.powermock', module: 'powermock-classloading-xstream'
}
}

Expand Down Expand Up @@ -205,7 +206,6 @@ android {
}

dependencies {
implementation project(':react-native-vector-icons')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "com.facebook.react:react-native:+" // From node_modules
Expand All @@ -221,6 +221,29 @@ dependencies {
implementation jscFlavor
}

implementation('junit:junit:4.13.1') {
force = true
}

implementation('org.robolectric:robolectric:4.4') {
force = true
}

implementation('com.drewnoakes:metadata-extractor:2.13.0') {
force = true
}

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

implementation('org.powermock:powermock-classloading-xstream:2.0.0') {
force = true
}

implementation('org.objenesis:objenesis:2.6') {
force = true
}
}

// Run this once to be able to run the application with BUCK
Expand Down
Binary file modified android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialIcons.ttf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import com.facebook.react.PackageList;

import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
Expand All @@ -31,11 +30,6 @@ protected List<ReactPackage> getPackages() {
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;

/*return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage()
);*/
}

@Override
Expand Down
61 changes: 53 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,61 @@ subprojects {
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}

if (details.requested.group == 'junit' && details.requested.name == 'junit') {
details.useVersion '4.13.1'
details.because 'https://snyk.io/vuln/SNYK-JAVA-JUNIT-1017047'
}

if (details.requested.group == 'org.robolectric' && details.requested.name == 'robolectric') {
details.useVersion '4.4'
details.because 'https://snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-32340'
}

if (details.requested.group == 'org.bouncycastle' && details.requested.name == 'bcprov-jdk15on') {
details.useVersion '1.68'
details.because 'https://snyk.io/vuln/SNYK-JAVA-ORGBOUNCYCASTLE-32340'
}

if (details.requested.group == 'com.drewnoakes' && details.requested.name == 'metadata-extractor') {
details.useVersion '2.13.0'
details.because 'https://snyk.io/vuln/SNYK-JAVA-COMDREWNOAKES-455419'
}

if (details.requested.group == 'org.powermock' && details.requested.name == 'powermock-classloading-xstream') {
details.useVersion '2.0.0'
details.because 'https://snyk.io/vuln/SNYK-JAVA-COMTHOUGHTWORKSXSTREAM-31394'
}

if (details.requested.group == 'org.apache.httpcomponents' && details.requested.name == 'httpclient') {
details.useVersion '4.5.13'
details.because 'https://snyk.io/vuln/SNYK-JAVA-ORGAPACHEHTTPCOMPONENTS-31517'
}

if (details.requested.group == 'org.apache.commons' && details.requested.name == 'commons-compress') {
details.useVersion '1.19'
details.because 'https://snyk.io/vuln/SNYK-JAVA-ORGAPACHECOMMONS-32473'
}

if (details.requested.group == 'commons-codec' && details.requested.name == 'commons-codec') {
details.useVersion '1.13'
details.because 'https://snyk.io/vuln/SNYK-JAVA-COMMONSCODEC-561518'
}

if (details.requested.group == 'com.google.guava' && details.requested.name == 'guava') {
details.useVersion '30.0-jre'
details.because 'https://snyk.io/vuln/SNYK-JAVA-COMGOOGLEGUAVA-1015415'
}
}
}

afterEvaluate {
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 29
buildToolsVersion = "29.0.3"
}
project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion = 29
buildToolsVersion = "29.0.3"
}
}
}
}
}
}
1 change: 1 addition & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
android.useDeprecatedNdk=true
android.useAndroidX=true
android.enableJetifier=true
android.jetifier.blacklist=bcprov-jdk15on

# The Gradle daemon aims to improve the startup and execution time of Gradle.
# When set to true the Gradle daemon is to run the build.
Expand Down
2 changes: 0 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
rootProject.name = 'verusmobile'
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

include ':app'
5 changes: 5 additions & 0 deletions env/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as iosEnv from './main.ios.json'
import * as androidEnv from './main.android.json'
import { Platform } from 'react-native'

module.exports = Platform.OS === 'ios' ? iosEnv : androidEnv
33 changes: 33 additions & 0 deletions env/main.android.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"APP_VERSION": "0.2.2",
"VERUS_QR_VERSION": "0.2.0",
"CHAIN_QR_VERSION": "0.1.0",
"ELECTRUM_PROTOCOL_CHANGE": 1.4,

"KEY_DERIVATION_VERSION": 1,

"REQUEST_TIMEOUT_MS": 60000,

"BLOCK_HEADER_STORE_CAP": 20,
"MIN_HEADER_CACHE_CONFS": 100,
"ETH_TRANSACTION_RECEIPT_CAP": 100,
"MIN_ETH_TX_CONFS": 100,

"ENABLE_FIAT_GATEWAY": false,
"ENABLE_VERUS_IDENTITIES": false,
"DISABLED_CHANNELS": ["dlight_private"],
"ENABLE_DLIGHT": false,
"ENABLE_ERC20": true,
"ENABLE_ETH": true,
"ENABLE_ELECTRUM": true,
"ENABLE_GENERAL": true,

"ETH_NETWORK": "homestead",

"BIOMETRIC_SECURITY_THRESHOLD": "SECURE_HARDWARE",

"INTERNAL_APP_ID": "Verus_Mobile",

"ETHERSCAN_API_KEY": "PUT_KEY_HERE",
"INFURA_PROJECT_ID": "PUT_ID_HERE"
}
4 changes: 3 additions & 1 deletion env/main.json → env/main.ios.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"APP_VERSION": "0.2.1-beta",
"APP_VERSION": "0.2.2",
"VERUS_QR_VERSION": "0.2.0",
"CHAIN_QR_VERSION": "0.1.0",
"ELECTRUM_PROTOCOL_CHANGE": 1.4,

"KEY_DERIVATION_VERSION": 1,

"REQUEST_TIMEOUT_MS": 60000,

"BLOCK_HEADER_STORE_CAP": 20,
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @format */
import 'react-native-gesture-handler'
//import 'react-native-gesture-handler'
import { AppRegistry } from 'react-native';
import App from './App';
import {name as appName} from './app.json';
Expand Down
Loading

0 comments on commit c2bb4c2

Please sign in to comment.