Author: donaldp
Date: Fri Dec 27 06:24:35 2013
New Revision: 1553630
URL: http://svn.apache.org/r1553630
Log:
* Support overriding the GWT version used by the GWT addon.
* Fix problem when the :dependencies option was not passed to the GWT addon.
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/addon/buildr/gwt.rb
Modified: buildr/trunk/CHANGELOG
URL:
http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1553630&r1=1553629&r2=1553630&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Dec 27 06:24:35 2013
@@ -1,4 +1,7 @@
1.4.16 (Pending)
+* Fixed: Support overriding the GWT version used by the GWT addon.
+* Fixed: Fix problem when the :dependencies option was not
+ passed to the GWT addon.
* Fixed: Avoid crash in GPG addon if unable to create a pom
for an artifact.
* Fixed: Correct location of Git mirror in the README. Submitted
Modified: buildr/trunk/addon/buildr/gwt.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/gwt.rb?rev=1553630&r1=1553629&r2=1553630&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/gwt.rb (original)
+++ buildr/trunk/addon/buildr/gwt.rb Fri Dec 27 06:24:35 2013
@@ -17,9 +17,18 @@ module Buildr
module GWT
class << self
+
+ def version=(version)
+ @version = version
+ end
+
+ def version
+ @version || '2.5.1'
+ end
+
# The specs for requirements
def dependencies
- %w(com.google.gwt:gwt-dev:jar:2.5.1)
+ ["com.google.gwt:gwt-dev:jar:#{version}"]
end
def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir,
options = {})
@@ -64,7 +73,7 @@ module Buildr
end
def superdev_dependencies
- self.dependencies + %w(com.google.gwt:gwt-codeserver:jar:2.5.1)
+ self.dependencies + ["com.google.gwt:gwt-codeserver:jar:#{version}"]
end
def gwt_superdev(module_name, source_artifacts, work_dir, options = {})
@@ -96,7 +105,9 @@ module Buildr
artifacts = (project.compile.sources +
project.resources.sources).collect do |a|
a.is_a?(String) ? file(a) : a
end
- dependencies = options[:dependencies] ?
artifacts(options[:dependencies]) : project.compile.dependencies
+ dependencies = options[:dependencies] ?
artifacts(options[:dependencies]) : (project.compile.dependencies +
[project.compile.target]).collect do |dep|
+ dep.is_a?(String) ? file(dep) : dep
+ end
unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
@@ -110,7 +121,17 @@ module Buildr
end
def gwt_superdev_runner(module_name, options = {})
- dependencies = artifacts(options[:dependencies]) ||
project.compile.dependencies
+
+ dependencies = []
+ if options[:dependencies]
+ dependencies = artifacts(options[:dependencies])
+ else
+ sources = [] + project.compile.sources + project.resources.sources
+ classes = [] + project.compile.dependencies +
[project.compile.target]
+ dependencies = (classes + sources).collect do |dep|
+ dep.is_a?(String) ? file(dep) : dep
+ end
+ end
desc "Run Superdev mode"
project.task("superdev") do