From f193820c44943f8746e922601b262d9ba6ab1b51 Mon Sep 17 00:00:00 2001 From: Robert Ying Date: Sun, 23 Jun 2019 14:06:55 +0800 Subject: [PATCH] Fix regression of improper assets copy --- react.gradle | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/react.gradle b/react.gradle index 9b45a8899c384e..1b8e303c4d4eee 100644 --- a/react.gradle +++ b/react.gradle @@ -64,33 +64,6 @@ 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)