<?xml version="1.0" encoding="UTF-8"?>
<project name="jruby-splitup" default="all" basedir=".">
    <property file="build.properties"/>
    <target name="all" depends="clean, jars"/>
    <target name="clean">
        <delete dir="${stdlib.dir}"/>
        <delete dir="${core.dir}"/>
        <delete dir="${lib.dir}"/>
    </target>
    <target name="prepare">
        <mkdir dir="${stdlib.dir}"/>
        <mkdir dir="${core.dir}"/>
        <mkdir dir="${lib.dir}"/>
        <echo message="Be patient. Unzipping jruby-complete.jar takes much time."/>
        <unzip src="${jruby.lib.dir}/jruby-complete.jar" dest="${stdlib.dir}"/>
    </target>
    <target name="jars" depends="prepare">
        <move file="${stdlib.dir}/org" tofile="${core.dir}/org"/>
        <move file="${stdlib.dir}/com" tofile="${core.dir}/com"/>
        <move file="${stdlib.dir}/jline" tofile="${core.dir}/jline"/>
        <move file="${stdlib.dir}/jay" tofile="${core.dir}/jay"/>
        <move file="${stdlib.dir}/jruby" tofile="${core.dir}/jruby"/>
        <jar basedir="${core.dir}" destfile="${lib.dir}/jruby-core.jar"/>
        <jar basedir="${stdlib.dir}" destfile="${lib.dir}/jruby-stdlib.jar"/>
    </target>
</project>

