Skip to content

Instantly share code, notes, and snippets.

@OlegKrikun
Last active August 29, 2015 14:01
Show Gist options
  • Save OlegKrikun/5dfe870b133adcc6c2b1 to your computer and use it in GitHub Desktop.
Save OlegKrikun/5dfe870b133adcc6c2b1 to your computer and use it in GitHub Desktop.
Example for removing unused fonts from RobotoTextView (https://github.com/johnkil/Android-RobotoTextView)
android.applicationVariants.all{ variant ->
variant.mergeAssets.doFirst {
File fonts = file("${rootDir}/build/exploded-aar/com.github.johnkil.android-robototextview/robototextview/2.0.1/assets/fonts")
if (fonts.exists()) {
for (File file : fonts.listFiles()) {
if (file.getName().contains("RobotoSlab")) {
println("delete " + file.getName() + " font")
file.delete()
};
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment