Hello,
I need to add an external source to the .project file when generating
an eclipse project. This is a requirement for my android project which
would fail upon testing otherwise. My aim would be to do something
along the following lines:
in buildfile:
eclipse.external_sources = project('RESTProvider')
and overriding the Eclipse module with:
---
module Buildr
module Eclipse
include Extension
class Eclipse
def external_sources=(var)
@external_sources = arrayfy(var)
end
def external_sources(*values)
if values.size > 0
@external_sources ||= []
@external_sources += values
else
@external_sources || (@project.parent ?
@project.parent.eclipse.external_sources : [])
end
end
end
end
end
class Buildr::Project
include Buildr::Eclipse::Android
end
---
>From here I am not sure how to overwrite the after_define method as it
seems to only call if the .project does not exist. As such if the base
Eclipe module creates the file, my implementation will not be called
and vice versa. I am not a rubyist per say so any guidance would be
appreciated.
Regards,
Carl