Skip to content

Instantly share code, notes, and snippets.

@quidryan
Created March 20, 2013 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quidryan/5202290 to your computer and use it in GitHub Desktop.
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.
/**
* 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