The first is that you’re using GString interpolation syntax (${...}) in your assignment to the srcDir property. Simply remove the braces and you should be good to go.
The second is that you’re attempting to assign the value to the srcDir property, but since you’re dealing with a list of values, you should actually use srcDirs instead (in fact, you should pretty much always favor srcDirs).
Like this:
sourceSets {
main {
java {
srcDirs = paths
}
}
}
Your gradle.properties file should not need to be changed at all for the above to work.
In the future, please include the error message that Gradle gives you at the command line. That helps us troubleshoot more quickly. Also, please use the triple-backtick syntax (```) for code blocks and single-backticks to better clarify program elements, for example, ${paths}.
Cannot cast object ‘[‘com.xxx.xxx.xxx…SiteAdminService’,‘com.xxx.xxx.xxx.rest.LoginFacadeService’,‘com.xxx.xxx.xxx.rest.LoginSiteApiService’]’ with class ‘java.lang.String’ to class ‘java.util.List’
actually I need these paths to be replaced in the below format in build.gradle