[ 
https://issues.apache.org/jira/browse/BUILDR-190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ittay Dror reopened BUILDR-190:
-------------------------------


actually, sources are resolved in several places:
def from(*sources)
      @sources |= sources.flatten
      guess_compiler if @compiler.nil? && sources.flatten.any? { |source| 
File.exist?(source) }
      self
end
in the second line sources.flatten resolves the FileList

and since #from is called when 'compile' is called:
def compile(*sources, &block)
      task('compile').from(sources).enhance &block
end

it is very easily resolved. in particular, after_define resolves it.

finally, since @sources is converted to Array in invoke_prerequisites, it is 
hard to create prerequisite tasks that set sources using  a FileList

(fwiw, i track when FileList is resolved by adding a fail in FileList#resolve 
and running buildr with a non-existent task)


> make it easy to exclude java source files from compilation
> ----------------------------------------------------------
>
>                 Key: BUILDR-190
>                 URL: https://issues.apache.org/jira/browse/BUILDR-190
>             Project: Buildr
>          Issue Type: Wish
>    Affects Versions: 1.3.2
>            Reporter: Ittay Dror
>             Fix For: 1.3.4
>
>
> I have cases where there are source files that should not be compiled (and 
> yet it is desired to keep them in scm). 
> i can use FileList inside the project definition (assign to compile.sources), 
> but then it means the files are scanned during the definition phase (where 
> afterwards this project's build may not be invoked)
> it would be nice if compile.sources could be a proc (or contain proc) that is 
> evaluated only before compilation

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to