Override the compile target adding a line that deletes the existing pod before recompiling.
Example below. the override code should work for standard F4 Fantom projects and needs to be added to your own build pod script.
Edited to make the delete command more general as below.
using build class Build : build::BuildPod { new make() { podName = "projadmgui" summary = "" srcDirs = [`fan/`] depends = ["sys 1.0", "gfx 1.0+", "fwt 1.0+", "concurrent 1.0+", "fluxText 1.0+", "sql 1.0+"] } @Target{help = "Delete target and recompile"} override Void compile() { outPodDir.plusName("${podName}.pod").toFile.delete super.compile } }
Cool.
Use a URI literal and Fantom interpolation to abbreviate the line a bit:
`bin/fan/lib/fan/${podName}.pod`.toFile.delete
How about this?
Should use outPodDir it is more general:
outPodDir
outPodDir.plusName("${podName}.pod").toFile.delete
Login or Signup to reply.
tomcl Fri 2 May 2014
Override the compile target adding a line that deletes the existing pod before recompiling.
Example below. the override code should work for standard F4 Fantom projects and needs to be added to your own build pod script.
Edited to make the delete command more general as below.
SlimerDude Fri 2 May 2014
Cool.
Use a URI literal and Fantom interpolation to abbreviate the line a bit:
tomcl Fri 2 May 2014
How about this?
Should use
outPodDir
it is more general:outPodDir.plusName("${podName}.pod").toFile.delete