@@ -30,12 +30,16 @@ def baseProjects() {
30
30
subprojects. findAll { p -> baseProjectNames. contains(p. name) }
31
31
}
32
32
33
+ def extractorProjects () {
34
+ subprojects. findAll { p -> ! baseProjectNames. contains(p. name) }
35
+ }
36
+
33
37
subprojects {
34
38
apply plugin : ' maven'
35
39
apply plugin : ' java'
36
40
sourceCompatibility = 1.5
37
41
targetCompatibility = 1.5
38
- buildInfoVersion = new Version (rootProject, ' 1.4.9 ' , false , baseProjectNames)
42
+ buildInfoVersion = new Version (rootProject, baseProjectNames)
39
43
artifactId = " build-info-$name "
40
44
41
45
dependencies {
@@ -58,11 +62,42 @@ configure(baseProjects()) {
58
62
test. useTestNG()
59
63
}
60
64
61
- /*
62
- configure(extractorProjects()) { p ->
63
- version = new Version(p)
65
+ configure(extractorProjects()) {
66
+ configurations {
67
+ tools
68
+ uberJar {
69
+ description = ' All jar that should be included in the Uber Jar'
70
+ transitive = true
71
+ }
72
+ compile {
73
+ extendsFrom uberJar
74
+ }
75
+ }
76
+
77
+ dependencies {
78
+ tools group : ' com.tonicsystems.jarjar' , name : ' jarjar-plugin' , version : ' 1.0'
79
+ }
80
+
81
+ task jarAll(type : Jar , dependsOn : jar) {
82
+ inputs. files jar. archivePath
83
+ classifier = ' uber'
84
+ doLast {
85
+ project. ant {
86
+ taskdef name : " jarjar" , classname : " com.tonicsystems.jarjar.JarJarTask" , classpath : configurations. tools. asPath
87
+ jarjar(jarfile : archivePath) {
88
+ zipfileset(src : jar. archivePath)
89
+ configurations. uberJar. files. each {jarjarFile ->
90
+ zipfileset(src : jarjarFile)
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ artifacts {
98
+ archives jarAll
99
+ }
64
100
}
65
- */
66
101
67
102
project(' api' ) {
68
103
description = ' JFrog Build-Info API'
@@ -86,12 +121,12 @@ project('extractor') {
86
121
}
87
122
88
123
project(' extractor-ivy' ) {
89
- version = new Version (project, ' 1.0.5 ' , false )
124
+ version = new Version (project)
90
125
description = ' JFrog Build-Info Ivy Extractor'
91
126
dependencies {
92
- compile project(' :extractor' )
93
- compile " org.slf4j:slf4j-api:1.5.8"
94
- compile " org.aspectj:aspectjweaver:1.6.9"
127
+ uberJar project(' :extractor' )
128
+ uberJar " org.slf4j:slf4j-api:1.5.8"
129
+ uberJar " org.aspectj:aspectjweaver:1.6.9"
95
130
compile(" com.google.code.findbugs:jsr305:1.3.9" ) {
96
131
provided : true
97
132
}
@@ -107,12 +142,12 @@ project('extractor-ivy') {
107
142
project(' extractor-gradle' ) {
108
143
apply plugin : ' groovy'
109
144
110
- version = new Version (project, ' 1.0.6 ' , false )
145
+ version = new Version (project)
111
146
description = ' JFrog Build-Info Gradle Extractor'
112
147
113
148
dependencies {
114
149
compile gradleApi()
115
- compile project(' :extractor' )
150
+ uberJar project(' :extractor' )
116
151
compile(" org.codehaus.plexus:plexus-component-annotations:1.5.4" ) {
117
152
provided : true
118
153
}
@@ -133,11 +168,11 @@ project('extractor-gradle') {
133
168
}
134
169
135
170
project(' extractor-maven3' ) {
136
- version = new Version (project, ' 1.0.4 ' , false )
171
+ version = new Version (project)
137
172
description = ' JFrog Build-Info Maven 3 Extractor'
138
173
139
174
dependencies {
140
- compile project(' :extractor' )
175
+ uberJar project(' :extractor' )
141
176
compile(" org.codehaus.plexus:plexus-component-annotations:1.5.4" ) {
142
177
provided : true
143
178
}
0 commit comments