-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
86 lines (66 loc) · 1.83 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.dm.gradle:bundle:0.3' // gradle bundle plugin
}
}
apply plugin: 'java'
repositories{
mavenCentral()
mavenLocal()
}
// configuration for all subprojects
configure(subprojects.findAll()) { subproject ->
repositories{
mavenCentral()
mavenLocal()
}
configurations {
// simulate maven's "provided" scope
provided
compile.extendsFrom configurations.provided
compile.transitive
}
apply plugin: 'java'
jar {
// create fat jar containing all compile dependencies
from {
(configurations.compile - configurations.provided)
.collect { it.isDirectory() ? it : zipTree(it) }
}
}
}
// configuration for all OSGi subprojects
configure(subprojects.findAll {it.name != 'WebracerStarter'}) { subproject ->
apply plugin: 'bundle'
// bundle {
// trace = true
// }
dependencies {
provided 'org.apache.felix:org.apache.felix.framework:4.4.1'
}
}
dependencies {
// define dependencies to subprojects for the install task
compile project(':WebracerTrack')
compile project(':WebracerTrackLongImpl')
compile project(':WebracerTrackShortImpl')
compile project(':WebracerDB')
compile project(':WebracerDBFileImpl')
compile project(':WebracerRace')
compile project(':WebracerWeb')
compile project(':WebracerStarter')
}
task install(type: Copy, dependsOn: 'jar') {
// copy all jars to one directory, which then can be used by OSGi framework
into 'repoOsgi'
from configurations.compile
.filter {it.name.startsWith('Webracer')}
}
jar.finalizedBy install
// create/update gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}