Skip to content

Commit 46d9ee5

Browse files
author
freds
committed
Using dynamic versions
1 parent 22ac5e9 commit 46d9ee5

File tree

9 files changed

+77
-6
lines changed

9 files changed

+77
-6
lines changed

Diff for: build-info-extractor-gradle/build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import org.jfrog.build.Version
1818
import org.apache.tools.ant.filters.ReplaceTokens
1919

2020
version = new Version(project)
21-
buildInfoVersion='1.4.x-SNAPSHOT'
2221

2322
description = 'JFrog Build-Info Gradle Extractor'
2423

@@ -53,7 +52,7 @@ dependencies {
5352
processResources {
5453
from(sourceSets.main.resources.srcDirs) {
5554
include '**/*template.gradle'
56-
filter(ReplaceTokens, tokens: ['fullVersion': version.toString(), 'buildInfoVersion':buildInfoVersion])
55+
filter(ReplaceTokens, tokens: ['fullVersion': version.toString(), 'buildInfoVersion': buildInfoVersion.toString()])
5756
}
5857
}
5958

Diff for: build-info-extractor-gradle/settings.gradle

-1
This file was deleted.

Diff for: build-info-extractor-ivy/build.gradle

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Copyright (C) 2010 JFrog Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import org.jfrog.build.Version
18+
19+
version = new Version(project)
120
description = 'JFrog Build-Info Ivy Extractor'
221

322
dependencies {

Diff for: build-info-extractor-ivy/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
previousVersion=1.0.4
2+
nextVersion=1.0.5
3+
isRelease=false

Diff for: build-info-extractor-maven3/build.gradle

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
/*
2+
* Copyright (C) 2010 JFrog Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
import org.jfrog.build.Version
17+
18+
version = new Version(project)
119
description = 'JFrog Build-Info Maven 3 Extractor'
220

321
dependencies {

Diff for: build-info-extractor-maven3/gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
previousVersion=1.0.3
2+
nextVersion=1.0.4
3+
isRelease=false

Diff for: build.gradle

+27-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,43 @@
1+
/*
2+
* Copyright (C) 2010 JFrog Ltd.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import org.jfrog.build.Version
18+
19+
// Root project version should not be used
20+
version='2'
121

222
allprojects {
3-
apply plugin: 'maven'
423
apply plugin: 'idea'
524
group = 'org.jfrog.buildinfo'
6-
version = '1.4.x-SNAPSHOT'
725
}
826

927
def baseProjects() {
1028
subprojects.findAll { !it.projectDir.name.startsWith('build-info-extractor-') }
1129
}
1230

31+
def extractorProjects() {
32+
subprojects.findAll { it.projectDir.name.startsWith('build-info-extractor-') }
33+
}
34+
1335
subprojects {
36+
apply plugin: 'maven'
1437
apply plugin: 'java'
1538
sourceCompatibility = 1.5
1639
targetCompatibility = 1.5
40+
buildInfoVersion = new Version(rootProject)
1741

1842
dependencies {
1943
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
@@ -23,10 +47,10 @@ subprojects {
2347
}
2448

2549
configure(baseProjects()) {
50+
version = buildInfoVersion
2651
dependencies {
2752
compile "com.google.guava:guava:r07"
2853
compile "com.thoughtworks.xstream:xstream:1.3.1"
29-
testCompile group: 'org.testng', name: 'testng', version: '5.12.1'
3054
}
3155
test.useTestNG()
3256
}

Diff for: gradle.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
previousVersion=1.4.8
2+
nextVersion=1.4.9
3+
isRelease=false

Diff for: settings.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ rootProject.children.each {project ->
2828
project.projectDir = new File(settingsDir, "build-info-$fileBaseName")
2929
if (!project.projectDir.isDirectory()) {
3030
project.projectDir = new File(settingsDir, "build-info-extractor-$fileBaseName")
31+
//project.setProperty('extractor','true')
32+
} else {
33+
//project.setProperty('extractor','false')
3134
}
3235
//project.buildFileName = "${fileBaseName}.gradle"
3336
assert project.projectDir.isDirectory()

0 commit comments

Comments
 (0)