Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
buildscript bootstrap is more configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Nov 24, 2010
1 parent 619cbdf commit 41efcbb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
22 changes: 17 additions & 5 deletions build.gradle
Expand Up @@ -16,14 +16,26 @@

buildscript {
repositories {
// in case you do not want to use mavenCentral at all
if(project.hasProperty('buildscript.repository'))
if(project.hasProperty('maven.buildscript.repository'))
{
mavenRepo urls: new File(project."buildscript.repository").toURI()
mavenRepo urls: new File(project.properties["maven.buildscript.repository"]).toURI()
}
else

if(project.hasProperty('ivy.buildscript.repository'))
{
add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
name = "ivy.buildscript.repository"
addIvyPattern "${project.properties['ivy.buildscript.repository']}/[organisation]/[module]/[revision]/[module]-[revision].ivy"
addArtifactPattern "${project.properties['ivy.buildscript.repository']}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
m2compatible = true
checkmodified = true
}
}

// if you want to disallow maven central
if(project.properties['no.maven.central'] != 'true')
{
mavenCentral()
mavenCentral()
}
}

Expand Down
1 change: 1 addition & 0 deletions repositories.gradle
Expand Up @@ -27,6 +27,7 @@ allRepositories.build = {
addIvyPattern "${topReleaseDir}/[organisation]/[module]/[revision]/[module]-[revision].ivy"
addArtifactPattern "${topReleaseDir}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
m2compatible = true
checkmodified = true
}

mavenRepo name: 'build-publish', urls: topPublishDir.toURI()
Expand Down

0 comments on commit 41efcbb

Please sign in to comment.