Skip to content

Instantly share code, notes, and snippets.

@maxirosson
Last active April 13, 2021 14:27
Show Gist options
  • Select an option

  • Save maxirosson/23b3c9ed3faa5f677f9ac77d8c23c89a to your computer and use it in GitHub Desktop.

Select an option

Save maxirosson/23b3c9ed3faa5f677f9ac77d8c23c89a to your computer and use it in GitHub Desktop.
def tasksToNotCache = [
"compile.*JavaWithJavac",
"compile.*LibraryResources",
"package.*Resources",
"strip.*DebugSymbols",
"mergeDebugAndroidTestNativeLibs",
"generateDebugRFile",
"dataBindingMergeDependencyArtifacts.*",
"dataBindingMergeGenClasses.*",
"bundleLibRuntimeToJarDebug",
"bundleLibCompileToJarDebug",
"parse.*LocalResources"
]
allprojects {
afterEvaluate {
tasks.matching {
task -> tasksToNotCache.any { task.name ==~ it }
}.configureEach {
outputs.cacheIf { false }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment