Created
November 8, 2013 14:32
-
-
Save davidmc24/7371821 to your computer and use it in GitHub Desktop.
Gradle init script snippet to remove mavenLocal from all builds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove mavenLocal from all projects | |
// It makes builds less reproducible, and is error-prone. | |
// http://issues.gradle.org/browse/GRADLE-2034 | |
projectsLoaded { | |
rootProject.allprojects { project -> | |
[buildscript.repositories, repositories].each { repoHandler -> | |
repoHandler.matching {it.name == "MavenLocal"}.all { repo -> | |
//project.logger.warn("Removing repo ${repo.name} from ${project.name}") | |
repoHandler.remove(repo) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment