Skip to content

Commit 0919587

Browse files
authored
Merge pull request #75 from microclimate-dev2ops/buildFix
Build fix
2 parents dd25b80 + b0a04c5 commit 0919587

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

dev/ant_build/build-mdt.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
<echo>Build label is "${buildLabel}"</echo>
3030
</target>
3131

32-
<!--target name="checkBuildLabelFile" >
32+
<target name="checkBuildLabelFile" >
3333
<available file="${mdt_build.basedir}/buildLabel.properties" property="buildLabel.present"/>
34-
</target-->
34+
</target>
3535

36-
<!--target name="createBuildLabelFile" depends="checkBuildLabelFile" unless="buildLabel.present"-->
37-
<target name="createBuildLabelFile">
36+
<target name="createBuildLabelFile" depends="checkBuildLabelFile" unless="buildLabel.present">
37+
<!--target name="createBuildLabelFile"-->
3838
<tstamp>
3939
<format property="buildLabel" pattern="yyyyMMdd_HHmm" timezone="UTC"/>
4040
</tstamp>

dev/build.gradle

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dependencies {
4242
// corelibs "com.nimbusds:oauth2-oidc-sdk:6.5"
4343
}
4444

45-
defaultTasks 'clean', 'getCoreDependencies', 'compile', 'generateOpenMDTUpdateSite', 'deployDHE'
45+
defaultTasks 'clean', 'getCoreDependencies', 'compile', 'generateOpenMDTUpdateSite'
4646

4747
task importAnt {
4848
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
@@ -58,6 +58,7 @@ task importAnt {
5858
// build-mdt provides the generateOpenMDTUpdateSite target, which is the entry point
5959
// for the compilation and assembling of updatesites
6060
ant.importBuild('ant_build/build-mdt.xml')
61+
println "Imported ant code"
6162
}
6263

6364
def projDir = projectDir.getAbsolutePath()
@@ -187,10 +188,8 @@ gradleGenerateMDTUpdateSite.dependsOn generateOpenMDTUpdateSite
187188
build.dependsOn compile
188189
build.dependsOn generateOpenMDTUpdateSite
189190

190-
compile.dependsOn importAnt
191191
compile.dependsOn downloadEclipseSDK
192192
compile.dependsOn downloadEclipseTargetPlatform
193-
compile.dependsOn getCoreDependencies
194193

195194
//// build version from the artifacts to avoid version mismatch
196195
import static groovy.io.FileType.FILES
@@ -210,9 +209,9 @@ def getBuildLabelFromArtifact() {
210209

211210
buildLabel = (fileName =~ "${filePrefix}(.*).zip")[0][1]
212211

213-
if (buildLabel.isEmpty()) {
214-
buildLabel = ant.properties['buildLabel']
215-
println "Unable to grab build label - ant buildLabel is used instead."
212+
if (buildLabel.isEmpty()) {
213+
buildLabel = ant.properties['buildLabel']
214+
println "Unable to grab build label - ant buildLabel is used instead."
216215
}
217216
}
218217
return buildLabel
@@ -426,6 +425,10 @@ task cleanBuilds(type: Delete) {
426425
println 'Delete ' + artifactsDir
427426
file(artifactsDir).deleteDir()
428427

428+
def buildLabelFile = project.properties['build.label.file']
429+
println 'Delete ' + buildLabelFile
430+
file(buildLabelFile).delete()
431+
429432
println 'Delete ' + toolsImageFolder
430433
file(toolsImageFolder).deleteDir()
431434
}
@@ -438,7 +441,6 @@ task cleanBuilds(type: Delete) {
438441
// Delete all prereq files, downloaded artifacts and build output
439442
task clean(type: Delete) {
440443
doLast {
441-
442444
}
443445

444446
onlyIf {

dev/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ eclipse.target.platform.folder=/target_platform
2323
eclipse.target.platform.ies.folder=/target_platform/prereqs/ies
2424
eclipse.temp.folder=/target_platform/prereqs/temp/plugins
2525
ant.artifacts.folder=ant_build/artifacts/
26+
build.label.file=ant_build/buildLabel.properties
2627
tools.image.folder=/tools.image
2728

2829
microclimate.core.prereqlib.folder=/com.ibm.microclimate.core/lib

0 commit comments

Comments
 (0)