Relative classpaths


(Scott Duchin) #1

I was using (no longer) relative classpaths. I think the relative classpaths should be computed from the directory where the gradle file is that defines the relative classpaths and not from the directory where gradle is run from


(Peter Niederwieser) #2

What exactly do you mean by “relative classpath”, and how are you creating one?


(Scott Duchin) #3

apply from: “…/…/other/directory”


(Peter Niederwieser) #4

All relative paths passed to Gradle APIs are resolved relative to the current project (not relative to the working directory for the Gradle process). When dealing with ‘File’ objects, it’s important to use ‘file(“relative/path”)’ instead of ‘new File(“relative/path”)’.