gradle - Exclude drawable-large resources from Android build -
Trying to find a way to exclude some drable resource files from my build trying to use this function But there was no change in the last APK size.
function __ filtered resostics (type: copy) {from ('res /') {excludable 'drawable-large /' exclude 'drawable-large-HDPI / drawable-big-xppy /' Drop out 'drawable-large-MDPI /' drable-big-ground / 'drop' drawable-large-HDPI / 'in' drawable-large-xdpi / '}' build / filtered_resources' are included in the empty Dirs = true }
taskss.whenTaskAdded {task -> If (task.name == 'mergeEnterprisedebugResources' || task.name == 'mergeEnterprisereleaseResources') {task.dependsOn __filteredResources} }
Anyone like this Tried to do that? P>
You can use resConfigs . Quote:
At the start of the Android Graduate plugin 0.7, you can pass information about the configuration, your API is related to the build system. This resConfig and resConfigs are thanked for the taste and default configuration options. Below, DSL prevents apps from packaging resources that do not match the App Managed Resource Configuration:
defaultConfig {// ... resConfigs "en", "de", " In your case, defaultConfig "," it "resConfigs" nodpi "," hdpi "," xhdpi "," xxhdpi "," xxxhdpi "} It has a resConfigs that lists the screen size you want, without large .
Comments
Post a Comment