Repository: buildr Updated Branches: refs/heads/master 5c13c284a -> 06df968d8
BUILDR-563: protobuf addon including source directories to protoc breaks build Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/06df968d Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/06df968d Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/06df968d Branch: refs/heads/master Commit: 06df968d8ef3cfcae79195108db7d5457fed7c10 Parents: 5c13c28 Author: Antoine Toulme <[email protected]> Authored: Mon Feb 13 23:24:25 2017 -0800 Committer: Antoine Toulme <[email protected]> Committed: Mon Feb 13 23:24:25 2017 -0800 ---------------------------------------------------------------------- CHANGELOG | 1 + addon/buildr/protobuf.rb | 13 +++++-------- 2 files changed, 6 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/06df968d/CHANGELOG ---------------------------------------------------------------------- diff --git a/CHANGELOG b/CHANGELOG index 84a70ef..d8acda9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ * Change: BUILDR-719 Change User-Agent when uploading artifacts * Change: Set the OPEN_IN_BROWSER to false when building idea launch targets via add_glassfish_remote_configuration. * Change: BUILDR-709 Integrate `buildr/custom_pom` into core and just make it the default pom generated. +* Fixed: BUILDR-563 protobuf addon including source directories to protoc breaks build 1.5.0 (2016-09-23) * Change: Update RJB to 1.5.4 http://git-wip-us.apache.org/repos/asf/buildr/blob/06df968d/addon/buildr/protobuf.rb ---------------------------------------------------------------------- diff --git a/addon/buildr/protobuf.rb b/addon/buildr/protobuf.rb index 502ed66..82dba90 100644 --- a/addon/buildr/protobuf.rb +++ b/addon/buildr/protobuf.rb @@ -23,10 +23,11 @@ module Buildr # # protoc _("path/to/proto/files") # - # and also supports two options, + # and also supports three options, # - # :output => "target/generated/protoc" # this is the default - # :lang => "java" # defaults to compile.language + # :include => ["path/to/proto", "src/main/resources/proto" # the directories in which to search for imports + # :output => "target/generated/protoc" # this is the default + # :lang => "java" # defaults to compile.language # module Protobuf class << self @@ -42,7 +43,7 @@ module Buildr command_line << "--#{options[:lang]}_out=#{options[:output]}" if options[:output] - (paths_from_sources(*args) + options[:include]).each { |i| command_line << "-I#{i}" } + options[:include].each { |i| command_line << "-I#{i}" } command_line += files_from_sources(*args) @@ -58,10 +59,6 @@ module Buildr def files_from_sources(*args) args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? FileList[f + "/**/*.proto"] : f }.flatten end - - def paths_from_sources(*args) - args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? f : File.dirname(f) } - end end def protoc(*args)
