travi/php-framework

View on GitHub
build/build.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<project name="framework" default="gates">
    <property name="shared.dir" value="${basedir}/.."/>
    <import file="build-shared.xml"/>
    <property file="build.properties" />

    <fileset id="js.files" dir="../" >
        <include name="client/js/**/*.js" />
        <exclude name="client/js/qunit/**/*.js" />
    </fileset>
    <fileset id="js.exclude.overrides" dir="../client/js/" >
        <include name="qunit/**/bootstrap.js" />
        <!-- My Plug-ins -->
        <include name="jquery/plugins/formAlign/*.js" />
    </fileset>
    <fileset id="js.tests" dir="../">
        <include name="php/framework/test/js/tests/**/*.js" />
        <include name="test/js/**/*.js"/>
        <include name="test/js/**/*.jstd"/>
        <include name="php/framework/test/js/tests/**/*.qunit" />
        <exclude name="test/js/tools/**/*.js" />
    </fileset>

    <fileset id="to.deploy" dir="${shared.dir}/">
        <include name="vendor/**"/>
        <include name="php/**"/>
        <include name="client/**"/>
        <include name="config/**"/>
    </fileset>

    <target name="minify">
        <yuicompress warn="false" munge="yes" preserveallsemicolons="true"
            outputfolder="${building.dir}/client/min/css/" >
            <fileset dir="${building.dir}/client/css/" >
                <include name="**/*.css" />
            </fileset>
        </yuicompress>
        <yuicompress warn="false" munge="yes" preserveallsemicolons="true"
            outputfolder="${building.dir}/client/min/js/" >
            <fileset dir="${building.dir}/client/js/" >
                <include name="**/*.js" />
                <include name="**/*.css" />
            </fileset>
        </yuicompress>
        <yuicompress warn="false" munge="yes" preserveallsemicolons="true"
            outputfolder="${building.dir}/client/min/thirdparty/" >
            <fileset dir="${building.dir}/client/thirdparty/" >
                <include name="**/*.js" />
                <include name="**/*.css" />
            </fileset>
        </yuicompress>
        <copy todir="${building.dir}/client/min/thirdparty/jquery/ui/themes/smoothness/images">
            <fileset dir="${building.dir}/client/thirdparty/jquery/ui/themes/smoothness/images"/>
        </copy>
    </target>

    <target name="phpcs-legacy" description="PHP Code Sniffer">
        <mkdir dir="${build.logs}"/>
        <exec executable="phpcs">
            <arg line="--version"/>
        </exec>
        <exec dir="${framework.dir}"
              executable="phpcs"
              output="${build.logs}/checkstyle-legacy.xml"
              failonerror="true">
            <arg line="--standard=${shared.dir}/build/codingStandard.xml"/>
            <arg line="--report=checkstyle ."/>
        </exec>
    </target>


    <target name="phpcpd-legacy" description="PHP Copy/Paste Detector">
        <exec dir="${framework.dir}"
              executable="phpcpd"
              failonerror="true">
            <arg line="--log-pmd ${build.logs}/pmd-cpd-legacy.xml ."/>
        </exec>
    </target>

    <target name="deploy-framework">
        <exec dir="${shared.dir}"
              executable="php"
              failonerror='true'>
            <arg line="${shared.dir}/lib/composer.phar install"/>
        </exec>
        <antcall target="deploy"/>
    </target>
</project>