Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from VerusCoin/dev
Merge Dev
- Loading branch information
Showing
8 changed files
with
171 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+134 Bytes
...in/res/drawable-hdpi/node_modules_reactnavigation_src_views_assets_backicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+207 Bytes
...res/drawable-xxxhdpi/node_modules_reactnavigation_src_views_assets_backicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.