GradleFx/GradleFx — Issue #17: Allow passing tokens to the srcDirs parameters of compc
Author: Taytay
Created: 2012-02-13 20:42:39+00:00
State: open

I was having some issue doing the following (which seemed like a reasonable thing to do)

```Groovy
srcDirs = [
'src/',
'src/resources/{locale}'
]
```
The "src/resources/{locale}" was being stripped out.
That was because in addSourcePaths of compc.groovy, it strips out source paths that don't exist. So, I made the following modification:

```groovy
private def addSourcePaths(List compilerArguments) {
project.srcDirs.each { sourcePath ->
File sourcePathDir = project.file(sourcePath)

//Removed this line:
// if(sourcePathDir.exists()) {
//Replaced with:
if(sourcePathDir.exists() || sourcePath.contains('{')) {
compilerArguments.add("-source-path+=" + project.file(sourcePath).path)
}
}
}
```

Not sure if it's the best way to handle it, but it fixed my issue and seemed reasonable to me.

(I have been meaning to learn to fork and submit a pull request, but I am short on time and don't want to go any longer without reporting a couple of minor code issues I ran into last week)