Skip to content

Instantly share code, notes, and snippets.

@milo-minderbinder
milo-minderbinder / blacklist.gradle
Created November 29, 2017 05:56
Gradle init script that adds a new task to all projects, `checkBlacklist`, which can be used to check if any of the project's resolvable dependencies are included in a configurable blacklist.
/**
* This init script modifies the Gradle project by adding a new task to all projects, `checkBlacklist`, which
* can be used to check if any of the project's resolvable dependencies are included in a configurable blacklist.
*
* To add it dynamically with a Gradle build command, add the `-I` option with the path to this file, e.g.:
* > gradle -I /path/to/blacklist.gradle checkBlacklist
*/
gradle.allprojects {