Created
March 20, 2013 04:21
-
-
Save quidryan/5202290 to your computer and use it in GitHub Desktop.
Netflix init.gradle to setup artifactory repos and our plugin, but being careful to not apply it.
This file contains hidden or 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
/** | |
* Establish simple Gradle practices which lets a gradle project play nice in the Netflix infrastructure. | |
*/ | |
rootProject { | |
def nebulaDev = rootProject.hasProperty('isNebulaDev') && rootProject.isNebulaDev.toBoolean() | |
def nebulaVer = rootProject.hasProperty('nebulaVersion') && rootProject.nebulaVersion ? rootProject.nebulaVersion : nebulaDev?'latest.snapshot':'@nebulaVersion@' | |
if (nebulaDev) { | |
println "+===============================================================================" | |
println "+ Proceeding as a Nebula Developer, may the force be with you." | |
allprojects { | |
buildscript { | |
configurations.all { | |
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | |
} | |
} | |
} | |
} | |
allprojects { | |
buildscript { | |
repositories { | |
// Nebula will require plugins from Central and jFrog. This repo combines them and local maven repo with nebula | |
// This also makes it easier for people to use public plugins without much more work | |
// I didn't have luck setting mavenLocal anywhere else | |
if (nebulaDev) { | |
mavenLocal() | |
} | |
maven { url 'http://artifacts.netflix.com/build-gradle' } | |
} | |
dependencies { | |
// Making nebula available, "apply plugin: 'nebula'" to use | |
classpath(group: 'netflix', name: 'nebula', version: nebulaVer, changing: nebulaDev) | |
} | |
} | |
repositories { | |
// RepoMan.defineResolveRepositories will set properly | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment