Skip to content

Commit

Permalink
Fixed dupplicate for RAW directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Dbroqua authored May 9, 2019
1 parent 962437f commit 91a2175
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,19 @@ afterEvaluate {
// 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/drawable-${resSuffix}")
File originalDir = file("$buildDir/generated/res/react/${flavorPathSegment}release/${resSuffix}")
if (originalDir.exists()) {
File destDir = file("$buildDir/../src/main/res/drawable-${resSuffix}")
File destDir = file("$buildDir/../src/main/res/${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()
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
Expand Down

0 comments on commit 91a2175

Please sign in to comment.