Skip to content

Commit 78f6c25

Browse files
author
Tim Etchells
committed
Build fix
1 parent dd25b80 commit 78f6c25

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-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: 16 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()
@@ -177,6 +178,11 @@ task build {
177178
}
178179
}
179180

181+
task gradleCompile {
182+
doLast {
183+
}
184+
}
185+
180186
task gradleGenerateMDTUpdateSite {
181187
doLast {
182188
}
@@ -187,10 +193,10 @@ gradleGenerateMDTUpdateSite.dependsOn generateOpenMDTUpdateSite
187193
build.dependsOn compile
188194
build.dependsOn generateOpenMDTUpdateSite
189195

190-
compile.dependsOn importAnt
191196
compile.dependsOn downloadEclipseSDK
192197
compile.dependsOn downloadEclipseTargetPlatform
193-
compile.dependsOn getCoreDependencies
198+
199+
gradleCompile.dependsOn compile
194200

195201
//// build version from the artifacts to avoid version mismatch
196202
import static groovy.io.FileType.FILES
@@ -210,9 +216,9 @@ def getBuildLabelFromArtifact() {
210216

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

213-
if (buildLabel.isEmpty()) {
214-
buildLabel = ant.properties['buildLabel']
215-
println "Unable to grab build label - ant buildLabel is used instead."
219+
if (buildLabel.isEmpty()) {
220+
buildLabel = ant.properties['buildLabel']
221+
println "Unable to grab build label - ant buildLabel is used instead."
216222
}
217223
}
218224
return buildLabel
@@ -426,6 +432,10 @@ task cleanBuilds(type: Delete) {
426432
println 'Delete ' + artifactsDir
427433
file(artifactsDir).deleteDir()
428434

435+
def buildLabelFile = project.properties['build.label.file']
436+
println 'Delete ' + buildLabelFile
437+
file(buildLabelFile).delete()
438+
429439
println 'Delete ' + toolsImageFolder
430440
file(toolsImageFolder).deleteDir()
431441
}
@@ -438,7 +448,6 @@ task cleanBuilds(type: Delete) {
438448
// Delete all prereq files, downloaded artifacts and build output
439449
task clean(type: Delete) {
440450
doLast {
441-
442451
}
443452

444453
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)