You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by vb...@apache.org on 2008/02/15 05:48:42 UTC

svn commit: r627947 - in /incubator/buildr/trunk: lib/core/compile.rb lib/java/groovyc.rb spec/groovy_compilers_spec.rb

Author: vborja
Date: Thu Feb 14 20:48:42 2008
New Revision: 627947

URL: http://svn.apache.org/viewvc?rev=627947&view=rev
Log:
Groovy compiler reports language as :groovy

Modified:
    incubator/buildr/trunk/lib/core/compile.rb
    incubator/buildr/trunk/lib/java/groovyc.rb
    incubator/buildr/trunk/spec/groovy_compilers_spec.rb

Modified: incubator/buildr/trunk/lib/core/compile.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/core/compile.rb?rev=627947&r1=627946&r2=627947&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/core/compile.rb (original)
+++ incubator/buildr/trunk/lib/core/compile.rb Thu Feb 14 20:48:42 2008
@@ -75,8 +75,8 @@
         # For example:
         #   specify :language=>:java, :target=>'classes', :target_ext=>'class', :packaging=>:jar
         def specify(attrs)
-          attrs[:sources] ||= attrs[:language].ergo { |lang| Array === lang ? lang.map(&:to_s) : lang.to_s }
-          attrs[:source_ext] ||= attrs[:language].ergo { |lang| Array === lang ? lang.map(&:to_s) : lang.to_s }
+          attrs[:sources] ||= attrs[:language].to_s
+          attrs[:source_ext] ||= attrs[:language].to_s
           attrs.each { |name, value| instance_variable_set("@#{name}", value) }
         end
 

Modified: incubator/buildr/trunk/lib/java/groovyc.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/groovyc.rb?rev=627947&r1=627946&r2=627947&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/groovyc.rb (original)
+++ incubator/buildr/trunk/lib/java/groovyc.rb Thu Feb 14 20:48:42 2008
@@ -63,7 +63,8 @@
       
       Java.classpath << dependencies
       
-      specify :language => [:groovy, :java], :target => 'classes', :target_ext => 'class', :packaging => :jar
+      specify :language => :groovy, :sources => [:groovy, :java], :source_ext => [:groovy, :java], 
+              :target => 'classes', :target_ext => 'class', :packaging => :jar
 
       def initialize(project, options) #:nodoc:
         super

Modified: incubator/buildr/trunk/spec/groovy_compilers_spec.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/groovy_compilers_spec.rb?rev=627947&r1=627946&r2=627947&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/groovy_compilers_spec.rb (original)
+++ incubator/buildr/trunk/spec/groovy_compilers_spec.rb Thu Feb 14 20:48:42 2008
@@ -53,7 +53,7 @@
   end
 
   it 'should report the multi-language as :groovy, :java' do
-    define('foo').compile.using(:groovyc).language.should == [:groovy, :java]
+    define('foo').compile.using(:groovyc).language.should == :groovy
   end
 
   it 'should set the target directory to target/classes' do