Skip to content

Commit 1007fc6

Browse files
author
freds
committed
Merging the build.gradle in one file
1 parent 7b765c7 commit 1007fc6

File tree

8 files changed

+98
-200
lines changed

8 files changed

+98
-200
lines changed

build-info-api/build.gradle

-18
This file was deleted.

build-info-client/build.gradle

-8
This file was deleted.

build-info-extractor-gradle/build.gradle

-79
This file was deleted.

build-info-extractor-ivy/build.gradle

-38
This file was deleted.

build-info-extractor-maven3/build.gradle

-34
This file was deleted.

build-info-extractor/build.gradle

-8
This file was deleted.

build.gradle

+94-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import org.jfrog.build.Version
18+
import org.apache.tools.ant.filters.ReplaceTokens
1819

1920
// Root project version should not be used
2021
version='2'
@@ -25,11 +26,11 @@ allprojects {
2526
}
2627

2728
def baseProjects() {
28-
subprojects.findAll { !it.projectDir.name.startsWith('build-info-extractor-') }
29+
subprojects.findAll { !it.name.startsWith('extractor-') }
2930
}
3031

3132
def extractorProjects() {
32-
subprojects.findAll { it.projectDir.name.startsWith('build-info-extractor-') }
33+
subprojects.findAll { it.name.startsWith('extractor-') }
3334
}
3435

3536
subprojects {
@@ -38,12 +39,17 @@ subprojects {
3839
sourceCompatibility = 1.5
3940
targetCompatibility = 1.5
4041
buildInfoVersion = new Version(rootProject)
42+
artifactId = "build-info-$name"
4143

4244
dependencies {
4345
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
4446
compile group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
4547
testCompile group: 'org.testng', name: 'testng', version: '5.12.1'
4648
}
49+
50+
jar {
51+
baseName = artifactId
52+
}
4753
}
4854

4955
configure(baseProjects()) {
@@ -55,4 +61,90 @@ configure(baseProjects()) {
5561
test.useTestNG()
5662
}
5763

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+
58150
dependsOnChildren()

settings.gradle

+4-13
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,13 @@
1717
include 'api'
1818
include 'client'
1919
include 'extractor'
20-
include 'gradle'
21-
include 'ivy'
22-
include 'maven3'
20+
include 'extractor-gradle'
21+
include 'extractor-ivy'
22+
include 'extractor-maven3'
2323

2424
rootProject.name = 'build-info'
2525

2626
rootProject.children.each {project ->
27-
String fileBaseName = project.name.replaceAll("\\p{Upper}") { "-${it.toLowerCase()}" }
28-
project.projectDir = new File(settingsDir, "build-info-$fileBaseName")
29-
if (!project.projectDir.isDirectory()) {
30-
project.projectDir = new File(settingsDir, "build-info-extractor-$fileBaseName")
31-
//project.setProperty('extractor','true')
32-
} else {
33-
//project.setProperty('extractor','false')
34-
}
35-
//project.buildFileName = "${fileBaseName}.gradle"
27+
project.projectDir = new File(settingsDir, "build-info-${project.name}")
3628
assert project.projectDir.isDirectory()
37-
assert project.buildFile.isFile()
3829
}

0 commit comments

Comments
 (0)