Skip to content

Commit

Permalink
Merge pull request #15 from VerusCoin/dev
Browse files Browse the repository at this point in the history
Merge Dev
  • Loading branch information
michaeltout committed Jun 2, 2019
2 parents 4696aa0 + b327577 commit 7241f6f
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 83 deletions.
32 changes: 18 additions & 14 deletions android/app/app.iml
Expand Up @@ -18,6 +18,7 @@
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
Expand Down Expand Up @@ -48,20 +49,20 @@
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
Expand All @@ -87,6 +88,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/apk_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundle_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
Expand All @@ -110,9 +112,11 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/signing_config" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/validate_signing_config" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
Expand All @@ -128,6 +132,7 @@
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:26.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-okhttp3:1.10.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.59.8@aar" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-base:1.10.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: javax.inject:javax.inject:1@jar" level="project" />
Expand All @@ -141,26 +146,25 @@
<orderEntry type="library" name="Gradle: com.google.code.findbugs:jsr305:3.0.2@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.react:react-native:0.59.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.15.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:26.1.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.koushikdutta.async:androidasync:2.1.6@jar" level="project" />
<orderEntry type="module" module-name="react-native-udp" />
<orderEntry type="module" module-name="react-native-tcp" />
<orderEntry type="module" module-name="react-native-screens" />
<orderEntry type="module" module-name="react-native-udp" />
<orderEntry type="module" module-name="react-native-camera" />
<orderEntry type="module" module-name="react-native-os" />
<orderEntry type="module" module-name="react-native-vector-icons" />
<orderEntry type="module" module-name="react-native-randombytes" />
<orderEntry type="module" module-name="react-native-svg" />
<orderEntry type="module" module-name="react-native-randombytes" />
<orderEntry type="module" module-name="react-native-camera" />
<orderEntry type="module" module-name="react-native-udp" />
<orderEntry type="module" module-name="react-native-tcp" />
<orderEntry type="module" module-name="react-native-screens" />
<orderEntry type="module" module-name="react-native-udp" />
<orderEntry type="module" module-name="react-native-camera" />
<orderEntry type="module" module-name="react-native-os" />
<orderEntry type="module" module-name="react-native-vector-icons" />
<orderEntry type="module" module-name="react-native-randombytes" />
<orderEntry type="module" module-name="react-native-svg" />
<orderEntry type="module" module-name="react-native-randombytes" />
<orderEntry type="module" module-name="react-native-camera" />
</component>
</module>
39 changes: 16 additions & 23 deletions android/app/build.gradle
Expand Up @@ -100,9 +100,9 @@ android {
defaultConfig {
applicationId "com.verusmobile"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
targetSdkVersion 26
versionCode 2
versionName "0.1.6-beta"
ndk {
abiFilters "armeabi-v7a", "x86"
}
Expand Down Expand Up @@ -134,31 +134,24 @@ android {
}
// 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:
// 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) * 1048576 + defaultConfig.versionCode
}
variant.outputs.all { output ->
outputFileName = "VerusMobile-${defaultConfig.versionName}.apk"
}
}
}

dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-udp')
compile project(':react-native-tcp')
compile project(':react-native-svg')
compile project(':react-native-screens')
compile project(':react-native-randombytes')
compile project(':react-native-os')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-vector-icons')
implementation project(':react-native-udp')
implementation project(':react-native-tcp')
implementation project(':react-native-svg')
implementation project(':react-native-screens')
implementation project(':react-native-randombytes')
implementation project(':react-native-os')
implementation project(':react-native-camera')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
}

// Run this once to be able to run the application with BUCK
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Expand Up @@ -11,7 +11,8 @@
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme"
android:testOnly="false">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.6-beta",
"private": true,
"scripts": {
"postinstall": "./node_modules/.bin/rn-nodeify --hack --install",
"postinstall": "patch-package && ./node_modules/.bin/rn-nodeify --hack --install",
"start": "node node_modules/react-native/local-cli/cli.js start",
"android": "react-native run-android",
"ios": "react-native run-ios",
Expand Down Expand Up @@ -31,14 +31,17 @@
"cordova-common": "^3.1.0",
"dns.js": "^1.0.1",
"domain-browser": "^1.2.0",
"events": "^1.0.0",
"https-browserify": "0.0.1",
"istanbul-reports": "^2.1.1",
"jsqr": "^0.2.2",
"lodash": "^4.17.4",
"meteor-node-stubs": "~0.2.4",
"node-gyp": "^3.8.0",
"nodejs-aes256": "^1.0.1",
"patch-package": "^6.1.2",
"path-browserify": "0.0.0",
"postinstall-postinstall": "^2.0.0",
"qrcode.react": "^0.7.1",
"querystring-es3": "^0.2.1",
"react": "16.8.3",
Expand Down Expand Up @@ -77,8 +80,7 @@
"tx-builder": "^0.18.0",
"url": "^0.10.3",
"vm": "^0.1.0",
"vm-browserify": "0.0.4",
"events": "^1.0.0"
"vm-browserify": "0.0.4"
},
"devDependencies": {
"babel-jest": "23.6.0",
Expand Down
65 changes: 65 additions & 0 deletions patches/react-native+0.59.8.patch
@@ -0,0 +1,65 @@
diff --git a/node_modules/react-native/react.gradle b/node_modules/react-native/react.gradle
index 4ead2b6..07fd9e3 100644
--- a/node_modules/react-native/react.gradle
+++ b/node_modules/react-native/react.gradle
@@ -48,6 +48,33 @@ afterEvaluate {
resourcesDir.mkdirs()
}

+
+ // If there are flavors, remember the current flavor for use in the resource path we move from
+ def flavorPathSegment = ""
+ android.productFlavors.all { flavor ->
+ if (targetName.toLowerCase().contains(flavor.name)) {
+ flavorPathSegment = flavor.name + "/"
+ }
+ }
+
+ // Address issue #22234 by moving generated resources into build dir so they are in one spot, not duplicated
+ doLast {
+ def moveFunc = { resSuffix ->
+ File originalDir = file("$buildDir/generated/res/react/${flavorPathSegment}release/${resSuffix}")
+ if (originalDir.exists()) {
+ File destDir = file("$buildDir/../src/main/res/${resSuffix}")
+ ant.move(file: originalDir, tofile: destDir);
+ }
+ }
+ moveFunc.curry("drawable-ldpi").call()
+ moveFunc.curry("drawable-mdpi").call()
+ moveFunc.curry("drawable-hdpi").call()
+ moveFunc.curry("drawable-xhdpi").call()
+ moveFunc.curry("drawable-xxhdpi").call()
+ moveFunc.curry("drawable-xxxhdpi").call()
+ moveFunc.curry("raw").call()
+ }
+
// Set up inputs and outputs so gradle can cache the result
inputs.files fileTree(dir: reactRoot, excludes: inputExcludes)
outputs.dir(jsBundleDir)
@@ -76,9 +103,11 @@ afterEvaluate {
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir, *extraArgs)
}

- enabled config."bundleIn${targetName}" ||
- config."bundleIn${variant.buildType.name.capitalize()}" ?:
- targetName.toLowerCase().contains("release")
+ enabled config."bundleIn${targetName}" != null
+ ? config."bundleIn${targetName}"
+ : config."bundleIn${variant.buildType.name.capitalize()}" != null
+ ? config."bundleIn${variant.buildType.name.capitalize()}"
+ : targetName.toLowerCase().contains("release")
}

// Expose a minimal interface on the application variant and the task itself:
@@ -146,6 +175,11 @@ afterEvaluate {
into ("merged_assets/${variant.name}/merge${targetName}Assets/out") {
from(jsBundleDir)
}
+
+ // Workaround for Android Gradle Plugin 3.4+ new asset directory
+ into ("merged_assets/${variant.name}/out") {
+ from(jsBundleDir)
+ }
}

// mergeAssets must run first, as it clears the intermediates directory

0 comments on commit 7241f6f

Please sign in to comment.