I am trying to test to reference without copying a library Project. So I created two projects one is ProjectA and one is LibraryA. Both project
I just do not understand what you want to do. But try changing the following line:
project(':LibraryA').projectDir = new File('../ProjectA')