buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [4/4] buildr git commit: Support specification of the target project to which the gwt compilation artifacts are added as an asset, by using :target_project option.
Date Sun, 18 Jan 2015 00:30:40 GMT
Support specification of the target project to which the gwt compilation
artifacts are added as an asset, by using :target_project option.


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/675e676b
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/675e676b
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/675e676b

Branch: refs/heads/master
Commit: 675e676b923eb4a44a4508aabd8f11153536f860
Parents: 2497ef7
Author: Peter Donald <peter@realityforge.org>
Authored: Sun Jan 18 11:30:32 2015 +1100
Committer: Peter Donald <peter@realityforge.org>
Committed: Sun Jan 18 11:30:32 2015 +1100

----------------------------------------------------------------------
 CHANGELOG           | 2 ++
 addon/buildr/gwt.rb | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/675e676b/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index af0cbeb..bd2d31d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,8 @@
 * Fixed:  Support dependencies in the gwt addon that are other local projects rather
           that artifacts, without forcing a compilation of dependency when parsing
           buildfile.
+* Added:  Support specification of the target project to which the gwt compilation
+          artifacts are added as an asset, by using :target_project option.
 
 1.4.21 (2014-11-28)
 * Change: Upgrade atoulme-Antwrap to 0.7.5 to remove deprecation warnings in

http://git-wip-us.apache.org/repos/asf/buildr/blob/675e676b/addon/buildr/gwt.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/gwt.rb b/addon/buildr/gwt.rb
index 5dfaa63..a711a87 100644
--- a/addon/buildr/gwt.rb
+++ b/addon/buildr/gwt.rb
@@ -112,6 +112,8 @@ module Buildr
       include Extension
 
       def gwt(module_names, options = {})
+        p = options[:target_project]
+        target_project = p.nil? ? project : p.is_a?(String) ? project(p) : p
         output_key = options[:output_key] || project.id
         output_dir = project._(:target, :generated, :gwt, output_key)
         artifacts = ([project.compile.target] + project.compile.sources + project.resources.sources).flatten.compact.collect
do |a|
@@ -147,7 +149,7 @@ module Buildr
         end
         task.enhance(dependencies)
         task.enhance([project.compile])
-        project.assets.paths << task
+        target_project.assets.paths << task
         task
       end
 


Mime
View raw message