-
Notifications
You must be signed in to change notification settings - Fork 4
/
spring.gradle
81 lines (72 loc) · 2.06 KB
/
spring.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
70
71
72
73
74
75
76
77
78
79
80
81
interface Const {
static final String DEF_VERSION = '5.3.23'
static final String SPRING_GROUP = 'org.springframework'
static final String SECURITY_GROUP = 'org.springframework.security'
}
/**
* Include Spring core bundles and ensure a common version for spring bundles.
*/
def springCore(String springVersion = Const.DEF_VERSION) {
def springGroup = Const.SPRING_GROUP
configurations {
bndplatform {
resolutionStrategy.eachDependency {
if (it.requested.group == Const.SPRING_GROUP || it.requested.group == Const.SECURITY_GROUP) {
it.useTarget(
group: it.requested.group,
name: it.requested.name,
version: springVersion // fixed version for all spring dependencies
)
}
}
}
}
platform {
feature id: 'platform.shared.spring.core',
name: 'Spring Framework Core',
version: springVersion, {
bundle group: springGroup, name: 'spring-core', version: springVersion
}
}
}
/**
* Add spring core and a set of default bundles to the platform.
*/
def spring(String springVersion = Const.DEF_VERSION, List<String> modules = [
'spring-beans',
'spring-context',
'spring-context-support'
]) {
def springGroup = Const.SPRING_GROUP
springCore(springVersion)
platform {
feature id: 'platform.shared.spring.modules',
name: 'Spring Framework Modules',
version: springVersion, {
modules.each {
plugin group: springGroup, name: it, version: springVersion
}
includes << 'platform.shared.spring.core'
}
}
}
/**
* Add spring core and a set of default bundles to the platform.
*/
def security(String springVersion = Const.DEF_VERSION, List<String> modules = [
'spring-security-core'
]) {
def springGroup = Const.SECURITY_GROUP
springCore(springVersion)
platform {
feature id: 'platform.shared.spring.security',
name: 'Spring Security',
version: springVersion, {
modules.each {
plugin group: springGroup, name: it, version: springVersion
}
// need to get rid of spring-jcl org.springframework.spring-jcl / org.springframework.spring-jcl
includes << 'platform.shared.spring.core'
}
}
}