Skip to content

Instantly share code, notes, and snippets.

@ziglee
Last active January 12, 2018 12:45
Show Gist options
  • Save ziglee/23606a2beff3443757703fb0207fdad8 to your computer and use it in GitHub Desktop.
Save ziglee/23606a2beff3443757703fb0207fdad8 to your computer and use it in GitHub Desktop.
Disable android build chache in gradle properties
File propsFile = new File('./gradle.properties')
if (!propsFile.exists()) {
propsFile.withWriterAppend { w -> w << 'android.enableBuildCache = false' }
} else {
Properties props = new Properties()
props.load(propsFile.newDataInputStream())
props.setProperty('android.enableBuildCache', 'false')
props.store(propsFile.newWriter(), null)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment