Created
March 10, 2016 17:15
-
-
Save kingargyle/031fb7209b127743f49a to your computer and use it in GitHub Desktop.
Add Nexus Mirrors to gradle builds with Init Script
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
// Replace the location of the nexus repository with your specific location. | |
// To enable this: gradlew build -I init.gradle | |
// This will now have gradle use the mirrors first and jcenter and other repositories second if it can't find the artifacts. | |
// Make sure your mirror Jcenter in your nexus repository. | |
allprojects{ | |
buildscript{ | |
repositories{ | |
maven{ url 'http://localhost:8081/nexus/content/groups/public' } | |
} | |
} | |
repositories { | |
maven{ url 'http://localhost:8081/nexus/content/groups/public' } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment