-
Notifications
You must be signed in to change notification settings - Fork 227
/
Copy pathbuild.gradle
69 lines (61 loc) · 2.13 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import org.asciidoctor.gradle.jvm.AsciidoctorTask
String customGroovyVersion = findProperty('groovyVersion') ?: System.getenv('GROOVY_VERSION')
if (customGroovyVersion) {
logger.lifecycle("Using custom Groovy version: $customGroovyVersion")
}
subprojects {
version = projectVersion
if (customGroovyVersion) {
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.apache.groovy') {
details.useVersion(customGroovyVersion)
}
}
}
}
repositories {
maven { url = 'https://repo.grails.org/grails/core' }
mavenCentral()
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'
}
}
}
}
tasks.register('clean', Delete) {
group = 'build'
delete layout.buildDirectory
}
// Workaround needed for nexus publishing bug
// version and group must be specified in the root project
// https://github.com/gradle-nexus/publish-plugin/issues/310
version = projectVersion
group = 'this.will.be.overridden'
def publishedProjects = [
'acl-plugin',
'cas-plugin',
'core-plugin',
'ldap-plugin',
'oauth2-plugin',
'spring-security-rest',
'spring-security-rest-gorm',
'spring-security-rest-grailscache',
'spring-security-rest-memcached',
'spring-security-rest-redis',
'ui-plugin'
]
subprojects {
if (name in publishedProjects) {
// This has to be applied here
apply plugin: 'org.grails.grails-publish'
}
else if(name == 'spring-security-rest-testapp-profile') {
apply plugin: 'org.grails.grails-profile-publish'
}
}