I am trying to parameterise my builds to enable other users easily adapt the build to their work.
which works fine. I want to add a property to gradle.properties, i.e:
moneydanceLib = "c:/Program Files/Moneydance3069/lib"
and in the build.gradle.kts I put
val moneydanceDir: String = rootProject.findProperty("moneydanceLib") as String
It uses a path of C:\Users\xxxxx.gradle\daemon\8.3"c:\Program Files\Moneydance3069\lib" which of course doesnot work.
Does anyone know how to specify an absolute path? Through experiment a String literal works but a String variable with the same information doesn’t
The problem is not string literal vs string variable.
The problem is, that the quotes are part of the string in the properties file.
And due to that the path is not recognized as absolute path but appended to the working directory.
Taking the quotes off worked. I have also moved away from using fileTree as has been suggested to use the flatDir, i.e
moneydanceLib = c:/Program Files/Moneydance3069/lib
// Use Maven Central for resolving dependencies.
* Place module specific dependencies here
flatDir is practically always better than