buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@realityforge.org>
Subject Re: Intellij Plugin to provide clear view of buildfile
Date Wed, 08 Sep 2010 01:53:40 GMT
> Sorry to subject you to this, but if the buildfile is Ruby, how do the 'desc' and 'define'
keywords fit into this?

Both of those are just methods (on Object IIRC?). So these methods
just call out to some buildr specific code and create the underlying
project objects.

If you "execute" the buildfile script you should be able to get a list
of all the projects through the method "Buildr.projects" so in theory
you could traverse the project graph and get all the information you
need to do the ui for an intellij plugin.

Put something like the following at the end of a build script to get a
feel for it

Buildr.projects.each do |project|
  puts project.name
end

Buildr.application.tasks.each do |task|
 if task.comment
     puts "#{task.name_with_args}: #{task.full_comment}"
 end
end

-- 
Cheers,

Peter Donald

Mime
View raw message