Problem with Windows Resources

Hi,

I want to add File version information in all shared libraries and executables.

Note: We want the version information as dynamic i.e. each library/exe has different information, So I created one task “createVersionRC” to create version.rc file in each project and calling this task before compilation. But somehow its not compiling this version.rc resource if we create this file at runtime.

Observation: It works perfectly fine if I have version.rc file present in the project before executing gradle.

Please help me to solve this problem.

apply from: "${home}/../versioning.gradle"
apply plugin: 'windows-resources'
  libraries {
    "${project.name}" {
        targetPlatforms 'x86'
    }
}
  sources {
    "${project.name}" {
        cpp {
   source {
    srcDirs "."
    include "**/*.cpp"
         }
            exportedHeaders {
                srcDirs "../common/inc"
                include "*.h"
                }
             }
    }
}
  sources {
    "${project.name}" {
        rc {
   source {
    srcDirs "."
    include "*.rc"
   }
            exportedHeaders {
                srcDirs "C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/atlmfc/include"
            }
        }
    }
}
  defaultTasks 'createVersionRC', "debug${project.name}SharedLibrary", "release${project.name}SharedLibrary"