-
Notifications
You must be signed in to change notification settings - Fork 198
/
Copy pathbuild.gradle
49 lines (44 loc) · 1.86 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ext {
isCiBuild = System.getenv('CI')
excludeUnusedTransDeps = findProperty('excludeUnusedTransDeps')
}
String customGroovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION')
if (customGroovyVersion) {
logger.lifecycle("Using custom Groovy version: $customGroovyVersion")
}
allprojects {
if (customGroovyVersion) {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.apache.groovy') {
details.useVersion(customGroovyVersion)
}
}
}
}
repositories {
mavenCentral()
maven { url = 'https://repo.grails.org/grails/core' }
// mavenLocal() // Keep, this will be uncommented and used by CI (groovy-joint-workflow)
if (customGroovyVersion?.endsWith('-SNAPSHOT')) {
// Used for testing locally against the latest snapshot of Groovy
// Usage: ./gradlew build -P"groovyVersion=X.X.X-SNAPSHOT"
logger.lifecycle('Adding Groovy Snapshot Repo for project: {}, Using Groovy {}', name, customGroovyVersion)
maven {
name = 'ASF Snapshot repo'
url = 'https://repository.apache.org/content/repositories/snapshots'
}
}
if (System.getenv('GITHUB_MAVEN_PASSWORD') && !grailsVersion.endsWith('-SNAPSHOT')) {
logger.lifecycle('Adding Grails Core Staging Repo for project: {}', name)
maven {
url = 'https://maven.pkg.github.com/grails/grails-core'
credentials {
username = 'DOES_NOT_MATTER'
password = System.getenv('GITHUB_MAVEN_PASSWORD')
}
}
}
}
}
apply from: layout.projectDirectory.file('gradle/documentation-config.gradle')