summaryrefslogtreecommitdiff
path: root/src/rebar_proto_gpb_compiler.erl
diff options
context:
space:
mode:
authorLuis Rascao <luis.rascao@miniclip.com>2015-01-30 15:37:21 +0000
committerLuis Rascao <luis.rascao@miniclip.com>2015-01-31 19:47:59 +0000
commitbf2b3e246821e5697b6154ce0d2254600c91b34c (patch)
tree6e7b5262a7170bb2c2e4861aec867b556db899f5 /src/rebar_proto_gpb_compiler.erl
parent48e041dd9ea0fd4e4ce4177fa819ed3b99cdf948 (diff)
downloadrebar-bf2b3e246821e5697b6154ce0d2254600c91b34c.tar.gz
Support custom protobuf directory
proto_opts config option contains the compiler directive that defines which proto compiler to use, also contains a src_dirs entry that defines a list of locations for the .proto files to be processed. Add integration test that compiles .proto files from src and from proto directory specified in separate rebar config files
Diffstat (limited to 'src/rebar_proto_gpb_compiler.erl')
-rw-r--r--src/rebar_proto_gpb_compiler.erl3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rebar_proto_gpb_compiler.erl b/src/rebar_proto_gpb_compiler.erl
index 37f901c..c528a4a 100644
--- a/src/rebar_proto_gpb_compiler.erl
+++ b/src/rebar_proto_gpb_compiler.erl
@@ -42,13 +42,12 @@
key() ->
gpb.
-proto_compile(Config, _AppFile, _ProtoFiles) ->
+proto_compile(Config, _AppFile, Files) ->
%% Check for gpb library -- if it's not present, fail
%% since we have.proto files that need building
case gpb_is_present() of
true ->
GpbOpts = user_gpb_opts(Config),
- Files = rebar_utils:find_files_by_ext("src", ".proto"),
Targets = [filename:join("src", target_filename(F, GpbOpts))
|| F <- Files],
rebar_base_compiler:run(Config, [],