Using ext properties in a copyspec that are defined by a dependency

I have a task that uses the SVN plugin to set an ext property, svnData, that I subsequently want to use in a copyspec. Here is my code:

task svnStatus(type: at.bxm.gradleplugins.svntools.SvnInfo) {
    sourcePath = tla
    targetPropertyName = "svnData"
}

task createReleaseNotes(type: Copy, dependsOn: svnStatus) {
    destinationDir = file(".")  
    from("../source/release-template.txt") {
        filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [
          'version' : "${vcommsversion}",
          'env' : "${depenv}",
          'date' : new Date().format('MMMM dd yyyy'),
          'rev' : "${svnData.revisionNumber}"
        ])
    }
}

When I try to run createReleaseNotes I get the error:

No such property: svnData for class: org.gradle.api.internal.file.copy.CopySpecWrapper_Decorated

So basically it tries to set up the copyspec before the dependent task has been run. How do get this to work so that I can insert the revision number into the copyspec?

You can try using something like a lazy GString.

${ -> svnData.revisionNumber}