15
15
*/
16
16
17
17
import org.jfrog.build.Version
18
+ import org.apache.tools.ant.filters.ReplaceTokens
18
19
19
20
// Root project version should not be used
20
21
version= ' 2'
@@ -25,11 +26,11 @@ allprojects {
25
26
}
26
27
27
28
def baseProjects () {
28
- subprojects. findAll { ! it. projectDir . name. startsWith(' build-info- extractor-' ) }
29
+ subprojects. findAll { ! it. name. startsWith(' extractor-' ) }
29
30
}
30
31
31
32
def extractorProjects () {
32
- subprojects. findAll { it. projectDir . name. startsWith(' build-info- extractor-' ) }
33
+ subprojects. findAll { it. name. startsWith(' extractor-' ) }
33
34
}
34
35
35
36
subprojects {
@@ -38,12 +39,17 @@ subprojects {
38
39
sourceCompatibility = 1.5
39
40
targetCompatibility = 1.5
40
41
buildInfoVersion = new Version (rootProject)
42
+ artifactId = " build-info-$name "
41
43
42
44
dependencies {
43
45
compile group : ' commons-lang' , name : ' commons-lang' , version : ' 2.4'
44
46
compile group : ' commons-logging' , name : ' commons-logging' , version : ' 1.1.1'
45
47
testCompile group : ' org.testng' , name : ' testng' , version : ' 5.12.1'
46
48
}
49
+
50
+ jar {
51
+ baseName = artifactId
52
+ }
47
53
}
48
54
49
55
configure(baseProjects()) {
@@ -55,4 +61,90 @@ configure(baseProjects()) {
55
61
test. useTestNG()
56
62
}
57
63
64
+ configure(extractorProjects()) { p ->
65
+ version = new Version (p)
66
+ }
67
+
68
+ project(' api' ) {
69
+ description = ' JFrog Build-Info API'
70
+ }
71
+
72
+ project(' client' ) {
73
+ description = ' JFrog Build-Info Client'
74
+ dependencies {
75
+ compile project(' :api' )
76
+ compile " org.apache.httpcomponents:httpclient:4.0"
77
+ compile " org.codehaus.jackson:jackson-mapper-asl:1.5.1"
78
+ }
79
+ }
80
+
81
+ project(' extractor' ) {
82
+ description = ' JFrog Build-Info Extractor'
83
+ dependencies {
84
+ compile project(' :client' )
85
+ testCompile " org.easymock:easymockclassextension:2.5.2"
86
+ }
87
+ }
88
+
89
+ project(' extractor-ivy' ) {
90
+ description = ' JFrog Build-Info Ivy Extractor'
91
+ dependencies {
92
+ compile project(' :extractor' )
93
+ compile " org.slf4j:slf4j-api:1.5.8"
94
+ compile " org.aspectj:aspectjweaver:1.6.9"
95
+ compile(" com.google.code.findbugs:jsr305:1.3.9" ) {
96
+ provided : true
97
+ }
98
+ compile(" org.apache.ivy:ivy:2.1.0" ) {
99
+ provided : true
100
+ }
101
+ compile(" org.apache.ant:ant:1.8.1" ) {
102
+ provided : true
103
+ }
104
+ }
105
+ }
106
+
107
+ project(' extractor-gradle' ) {
108
+ apply plugin : ' groovy'
109
+
110
+ description = ' JFrog Build-Info Gradle Extractor'
111
+
112
+ dependencies {
113
+ compile gradleApi()
114
+ compile project(' :extractor' )
115
+ compile(" org.codehaus.plexus:plexus-component-annotations:1.5.4" ) {
116
+ provided : true
117
+ }
118
+ compile(" com.google.code.findbugs:jsr305:1.3.9" ) {
119
+ provided : true
120
+ }
121
+ compile group : ' javax.annotation' , name : ' jsr250-api' , version : ' 1.0'
122
+ compile group : ' org.apache.ivy' , name : ' ivy' , version : ' 2.2.0'
123
+ groovy localGroovy()
124
+ }
125
+
126
+ processResources {
127
+ from(sourceSets. main. resources. srcDirs) {
128
+ include ' **/*template.gradle'
129
+ filter(ReplaceTokens , tokens : [' fullVersion' : version. toString(), ' buildInfoVersion' : buildInfoVersion. toString()])
130
+ }
131
+ }
132
+ }
133
+
134
+ project(' extractor-maven3' ) {
135
+ description = ' JFrog Build-Info Maven 3 Extractor'
136
+
137
+ dependencies {
138
+ compile project(' :extractor' )
139
+ compile(" org.codehaus.plexus:plexus-component-annotations:1.5.4" ) {
140
+ provided : true
141
+ }
142
+ compile(" org.apache.maven:maven-core:3.0" ) {
143
+ provided : true
144
+ }
145
+
146
+ testCompile " org.easymock:easymockclassextension:2.5.2"
147
+ }
148
+ }
149
+
58
150
dependsOnChildren()
0 commit comments