Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't compile the gems into the jar
  • Loading branch information
nschonni committed Nov 3, 2012
1 parent 0b42bfe commit 48bd09b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
1 change: 1 addition & 0 deletions build/build-tasks.properties
Expand Up @@ -13,6 +13,7 @@ cssurlembed.jar=${lib.dir}/cssembed-0.4.5.jar

#jRuby Properties
jruby.version=1.6.8
jruby.jar=jruby-complete-${jruby.version}.jar

#Gems
gem.dir=${lib.dir}/jruby-compiled
Expand Down
19 changes: 3 additions & 16 deletions build/build-tasks.xml
Expand Up @@ -45,35 +45,22 @@
<classpath refid="jshint.classpath" />
</taskdef>

<!-- Include the compiled jruby.jar file -->
<path id="jruby.classpath">
<fileset dir="${lib.dir}">
<include name="${jruby.jar}"/>
</fileset>
</path>

<!-- Include jruby + gems (compass + sass) -->
<target name="-build-jruby" depends="-jruby.jar.check" unless="jruby.jar.exists">
<mkdir dir="${lib.dir}/jruby-compiled" />
<delete dir="${lib.dir}/vendors-${jruby.depends}" />
<get src="http://jruby.org.s3.amazonaws.com/downloads/${jruby.version}/jruby-complete-${jruby.version}.jar" dest="${lib.dir}/jruby-complete-${jruby.version}.jar" skipexisting="true"/>
<get src="http://jruby.org.s3.amazonaws.com/downloads/${jruby.version}/${jruby.jar}" dest="${lib.dir}/${jruby.jar}" skipexisting="true"/>
<get src="http://production.cf.rubygems.org/gems/${sass.gem}" dest="${gem.dir}/${sass.gem}" skipexisting="true"/>
<get src="http://production.cf.rubygems.org/gems/${chunky_png.gem}" dest="${gem.dir}/${chunky_png.gem}" skipexisting="true"/>
<get src="http://production.cf.rubygems.org/gems/${fssm.gem}" dest="${gem.dir}/${fssm.gem}" skipexisting="true"/>
<get src="http://production.cf.rubygems.org/gems/${compass.gem}" dest="${gem.dir}/${compass.gem}" skipexisting="true"/>
<java jar="${lib.dir}/jruby-complete-${jruby.version}.jar" fork="true">
<java jar="${lib.dir}/${jruby.jar}" fork="true">
<arg line="-S gem install -i &quot;${lib.dir}/vendors-${jruby.depends}&quot; &quot;${gem.dir}/${sass.gem}&quot; &quot;${gem.dir}/${chunky_png.gem}&quot; &quot;${gem.dir}/${fssm.gem}&quot; &quot;${gem.dir}/${compass.gem}&quot;"/>
</java>
<exec executable="jar" dir="${lib.dir}/">
<arg line="-uf jruby-complete-${jruby.version}.jar -C vendors-${jruby.depends} ." />
</exec>
<move file="${lib.dir}/jruby-complete-${jruby.version}.jar" tofile="${lib.dir}/${jruby.jar}"/>
<delete dir="${gem.dir}" />
</target>

<target name="-jruby.jar.check">
<checksum file="${tasks.basedir}/build-tasks.properties" property="jruby.depends"/>
<property name="jruby.jar" value="jruby-${jruby.depends}.jar" />
<condition property="jruby.jar.exists">
<available file="${lib.dir}/${jruby.jar}" type="file"/>
</condition>
Expand All @@ -88,7 +75,7 @@
</target>

<target name="call.sass">
<java classname="org.jruby.Main" fork="true" failonerror="true" classpathref="jruby.classpath">
<java fork="true" failonerror="true" jar="${lib.dir}/${jruby.jar}">
<arg path="${tasks.basedir}/compile.rb"/>
<arg path="${lib.dir}/vendors-${jruby.depends}/gems/"/>
<arg value="${command}"/>
Expand Down

0 comments on commit 48bd09b

Please sign in to comment.