Permalink
Browse files

add setting the platform based upon key

  • Loading branch information...
1 parent 35f0d40 commit bd771db65b6a91ae410e1b6559fa8360a23591a9 @copiousfreetime committed Feb 6, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 tasks/this.rb
View
@@ -146,8 +146,15 @@ def java_gemspec( core = core_gemspec, &block )
yielding_gemspec( 'java', core, &block )
end
+ # Internal: give an initial spec and a key, create a new gemspec based off of
+ # it.
+ #
+ # This will force the new gemspecs 'platform' to be that of the key, since the
+ # only reason you would have multiple gemspecs at this point is to deal with
+ # different platforms.
def yielding_gemspec( key, core )
spec = gemspecs[key] ||= core.dup
+ spec.platform = key
yield spec if block_given?
return spec
end

0 comments on commit bd771db

Please sign in to comment.