title: Gradle copy method not working when $buildDir.parent is used
body: <p>I need to execute a copy task before an integration test and this is how I am doing it. </p>
  
  <pre><code>    println "project dir is" +  "${buildDir.parent}"//this line prints the path of the directory fine when i run the script
  
      //here is my copy method which needs to run before the test task
      test.doFirst {
          copy {
              from '${buildDir.parent}/test/xx.xml'
  
              into '${buildDir.parent}/build/classes/test'
  
               }
          }
  </code></pre>
  
  <p>Below is the output on the console when I run gradle test: </p>
  
  <p>Output: <em>the project directory isC:\Users\xxx\git\xyz\xyz\xxx</em></p>
  
  <p>However when I run the test task the file is not getting copied </p>
  
  <p>Please help! </p>