Fix GWT addon to explicitly add gwt-dev artifact to gwt compile path now that the...
authorPeter Donald <peter@realityforge.org>
Fri, 14 Aug 2015 23:44:25 +0000 (09:44 +1000)
committerPeter Donald <peter@realityforge.org>
Fri, 14 Aug 2015 23:44:25 +0000 (09:44 +1000)
CHANGELOG
addon/buildr/gwt.rb

index 67a690f..9c6abad 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
 1.4.24 (Pending)
 * Change: Update the default GWT version used in the GWT addon to the latest release 2.7.0.
+* Fixed:  Fix GWT addon to explicitly add gwt-dev artifact to gwt compile path now that
+          the bug that allowed unintended sharing has been fixed.
 * Fixed:  Fix bug in IDEA module generation that resulted in dependencies in IDEA module
           using shared references to compile dependencies.
 * Change: Update the checkstyle addon to use checkstyle 6.7.
index 8b14949..d939958 100644 (file)
@@ -127,22 +127,22 @@ 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.is_a?(Buildr::Artifact)
-            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
+        additional_gwt_deps = []
+        existing_deps = project.compile.dependencies.collect do |d|
+          a = artifact(d)
+          a.invoke if a.is_a?(Buildr::Artifact)
+          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 !project.iml? || existing_deps.include?(a.to_s)
+          additional_gwt_deps << a
         end
 
         task = project.file(output_dir) do
           Buildr::GWT.gwtc_main(module_names,
-                                (dependencies + artifacts).flatten.compact,
+                                (dependencies + artifacts + additional_gwt_deps).flatten.compact,
                                 output_dir,
                                 unit_cache_dir,
                                 {:version => version}.merge(options))