You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Sean Rhea <se...@gmail.com> on 2010/10/17 20:23:34 UTC
How to use Google Protobufs with Buildr?
Hi,
I found BUILDR-368, which seems to add support for generating .java
files from .proto files, but I can't figure out quite how to use it.
I presume it's going to add some task as a prereq for the compile
task, generate .java files, and add the path where it puts them to the
input compile path. Is that right? I can see that I need to
require 'buildr/protobuf'
but what else do I need to do? Is there a small example somewhere?
Thanks in advance,
Sean
--
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK
Re: How to use Google Protobufs with Buildr?
Posted by Alex Boisvert <al...@gmail.com>.
I've now updated the rdoc of addon/buildr/protobuf.rb to reflect this.
alex
On Sun, Oct 17, 2010 at 11:38 AM, Alex Boisvert <al...@gmail.com>wrote:
> I haven't seen any examples anywhere.
>
> Just reading through the source quickly, it looks like you use it as
> follows in your project:
>
> protoc _("path/to/proto/files")
>
> and also supports two options,
>
> :output => "target/generated/protoc" # this is the default
> :lang => "java" # defaults to compile.language
>
> alex
>
>
> On Sun, Oct 17, 2010 at 11:23 AM, Sean Rhea <se...@gmail.com> wrote:
>
>> Hi,
>>
>> I found BUILDR-368, which seems to add support for generating .java
>> files from .proto files, but I can't figure out quite how to use it.
>> I presume it's going to add some task as a prereq for the compile
>> task, generate .java files, and add the path where it puts them to the
>> input compile path. Is that right? I can see that I need to
>>
>> require 'buildr/protobuf'
>>
>> but what else do I need to do? Is there a small example somewhere?
>>
>> Thanks in advance,
>> Sean
>> --
>> "I refuse to accept the idea that the ‘isness’ of man’s present nature
>> makes him morally incapable of reaching up for the eternal ‘oughtness’
>> that forever confronts him." --MLK
>>
>
>
Re: How to use Google Protobufs with Buildr?
Posted by Alex Boisvert <al...@gmail.com>.
I haven't seen any examples anywhere.
Just reading through the source quickly, it looks like you use it as follows
in your project:
protoc _("path/to/proto/files")
and also supports two options,
:output => "target/generated/protoc" # this is the default
:lang => "java" # defaults to compile.language
alex
On Sun, Oct 17, 2010 at 11:23 AM, Sean Rhea <se...@gmail.com> wrote:
> Hi,
>
> I found BUILDR-368, which seems to add support for generating .java
> files from .proto files, but I can't figure out quite how to use it.
> I presume it's going to add some task as a prereq for the compile
> task, generate .java files, and add the path where it puts them to the
> input compile path. Is that right? I can see that I need to
>
> require 'buildr/protobuf'
>
> but what else do I need to do? Is there a small example somewhere?
>
> Thanks in advance,
> Sean
> --
> "I refuse to accept the idea that the ‘isness’ of man’s present nature
> makes him morally incapable of reaching up for the eternal ‘oughtness’
> that forever confronts him." --MLK
>