build.gradle - Gradle copy method not working when $buildDir.parent is used -


i need execute copy task before integration test , how doing it.

    println "project dir is" +  "${builddir.parent}"//this line prints path of directory fine when run script      //here copy method needs run before test task     test.dofirst {         copy {             '${builddir.parent}/test/xx.xml'              '${builddir.parent}/build/classes/test'               }         } 

below output on console when run gradle test:

output: the project directory isc:\users\xxx\git\xyz\xyz\xxx

however when run test task file not getting copied

please help!

solved! using single quotes don't support string interpolation.

reference: peter niederwieser @ gradle single vs double quotes


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -