Dynamic properties used in different extensions

We have the need for an extension that will set a value for a property. This property would be used by another extension. For example

download {

task downloadArtifact(type: Download) {
    // Sets the fileName property based upon a derived file name (Maven SNAPSHOT artifact)

ospackage {
    from(${fileName}) {

task buildRpm {
    dependsOn downloadArtifact

I have attempted to use extensions, but have not been able to find a way to update the variable fileName. Is there a way to create a “dynamic property” that can be updated that a task later in the order can use?

In the above example, the download extension would set the property value of fileName to artifact-1.0.0.war with the buildRpm task that uses the ospackage configuration closure using the fileName set by the download extension.

Thanks in advance,