Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (40 sloc) 1.44 KB
ext {
def coreBuildFilePath = 'https://raw.githubusercontent.com/grails/grails-core/master/build.gradle'
def coreBuildFileUrl = new URL(coreBuildFilePath)
def versionNumberRegex = /^\s*grailsVersion\s*=\s*['|"](.*)['|"]\s*$/
def grailsVersionList = []
coreBuildFileUrl.eachLine { line ->
def matcher = (line =~ versionNumberRegex)
if(matcher) {
grailsVersionList << matcher[0][1]
}
}
if(!grailsVersionList) {
throw new GradleException("Could not find Grails version at $coreBuildFilePath")
} else if(grailsVersionList.size() > 1) {
throw new GradleException("Multiple Grails versions (${grailsVersionList}) found at $coreBuildFilePath")
}
grailsVersion = grailsVersionList[0]
}
subprojects {
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
mavenCentral()
maven { url "http://repo.grails.org/grails/core" }
maven {
url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
content {
includeVersionByRegex('org\\.grails\\.plugins', '.*', '.*BUILD-SNAPSHOT')
}
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
content {
includeVersionByRegex('io\\.micronaut.*', '.*', '.*BUILD-SNAPSHOT')
}
}
}
}