diff --git a/react.gradle b/react.gradle index 142a21c8a2db50..a9482903938a3c 100644 --- a/react.gradle +++ b/react.gradle @@ -47,7 +47,22 @@ afterEvaluate { resourcesDir.deleteDir() resourcesDir.mkdirs() } - + doLast { + def moveFunc = { resSuffix -> + File originalDir = file("$buildDir/generated/res/react/release/drawable-${resSuffix}"); + if (originalDir.exists()) { + File destDir = file("$buildDir/../src/main/res/drawable-${resSuffix}"); + ant.move(file: originalDir, tofile: destDir); + } + } + moveFunc.curry("ldpi").call() + moveFunc.curry("mdpi").call() + moveFunc.curry("hdpi").call() + moveFunc.curry("xhdpi").call() + moveFunc.curry("xxhdpi").call() + moveFunc.curry("xxxhdpi").call() + } + // Set up inputs and outputs so gradle can cache the result inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) outputs.dir(jsBundleDir)