buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [3/3] buildr git commit: Add missing gwt dependencies to idea module files if they are not already present
Date Thu, 13 Nov 2014 22:49:56 GMT
Add missing gwt dependencies to idea module files if they are not already present


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

Branch: refs/heads/master
Commit: 4fca5593b5cb05902d1cf880e9517456b280e5dd
Parents: 4f800dd
Author: Peter Donald <peter@realityforge.org>
Authored: Fri Nov 14 09:49:35 2014 +1100
Committer: Peter Donald <peter@realityforge.org>
Committed: Fri Nov 14 09:49:35 2014 +1100

----------------------------------------------------------------------
 addon/buildr/gwt.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/4fca5593/addon/buildr/gwt.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/gwt.rb b/addon/buildr/gwt.rb
index 8d01daf..5eadd20 100644
--- a/addon/buildr/gwt.rb
+++ b/addon/buildr/gwt.rb
@@ -125,6 +125,20 @@ module Buildr
 
         version = gwt_detect_version(dependencies) || Buildr::GWT.version
 
+        if project.iml?
+
+          existing_deps = project.compile.dependencies.collect do |d|
+            a = artifact(d)
+            a.invoke if a.respond_to?(:invoke)
+            a.to_s
+          end
+          Buildr::GWT.dependencies(version).each do |d|
+            a = artifact(d)
+            a.invoke if a.respond_to?(:invoke)
+            project.iml.main_dependencies << a.to_s unless existing_deps.include?(a.to_s)
+          end
+        end
+
         task = project.file(output_dir) do
           Buildr::GWT.gwtc_main(module_names,
                                 (dependencies + artifacts).flatten.compact,


Mime
View raw message