Skip to content

Instantly share code, notes, and snippets.

@andreferi3
Created May 12, 2020 12:29
Show Gist options
  • Select an option

  • Save andreferi3/dbe91c5957402c61c04ee3800276aa84 to your computer and use it in GitHub Desktop.

Select an option

Save andreferi3/dbe91c5957402c61c04ee3800276aa84 to your computer and use it in GitHub Desktop.
// So basically you edit the /node_modules/react-native/react.gradle file
// and add the doLast right after the doFirst block, manually.
doFirst { ... }
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()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment