101 lines
3.3 KiB
XML
101 lines
3.3 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="jawira/emoji-catalog" default="help" phingVersion="3">
|
|
|
|
|
|
<property name="emoji.source" value="https://unicode.org/Public/emoji/15.0/emoji-test.txt"/>
|
|
|
|
|
|
<target name="setup" description="Prepare project for dev" depends="composer:install"/>
|
|
<target name="qa" description="Quality assurance"
|
|
depends="composer:normalize,composer:validate,php:lint,emoji:tests"/>
|
|
<target name="update" description="Update class and catalog"
|
|
depends="emoji:download-source,emoji:update,doc:update,emoji:count"/>
|
|
|
|
|
|
<target name="composer:validate" description="Validate composer.json">
|
|
<composer command="validate">
|
|
<arg value="--no-interaction"/>
|
|
<arg value="--profile"/>
|
|
<arg value="--strict"/>
|
|
<arg value="--quiet"/>
|
|
</composer>
|
|
</target>
|
|
|
|
<target name="composer:install" description="Install for dev">
|
|
<composer command="install">
|
|
<arg value="--quiet"/>
|
|
<arg value="--no-suggest"/>
|
|
<arg value="--no-interaction"/>
|
|
<arg value="--profile"/>
|
|
<arg value="--prefer-dist"/>
|
|
</composer>
|
|
</target>
|
|
|
|
<target name="composer:normalize" description="Normalize composer.json">
|
|
<composer command="normalize">
|
|
<arg value="--ansi"/>
|
|
<arg value="--no-interaction"/>
|
|
<arg value="--diff"/>
|
|
<arg value="--indent-size=2"/>
|
|
<arg value="--indent-style=space"/>
|
|
</composer>
|
|
</target>
|
|
|
|
<target name="emoji:download-source">
|
|
<mkdir dir="resources/unicode"/>
|
|
<httpget dir="resources/unicode" url="${emoji.source}"/>
|
|
</target>
|
|
|
|
<target name="emoji:update" description="Generate Emoji class">
|
|
<autoloader autoloaderpath="vendor/autoload.php"/>
|
|
<taskdef name="emoji-update" classname="\Jawira\EmojiTask\EmojiUpdateTask"/>
|
|
<emoji-update/>
|
|
</target>
|
|
|
|
<target name="doc:update">
|
|
<autoloader autoloaderpath="vendor/autoload.php"/>
|
|
<taskdef name="catalog-update" classname="\Jawira\EmojiTask\CatalogUpdateTask"/>
|
|
<catalog-update/>
|
|
</target>
|
|
|
|
<target name="php:lint" description="Check PHP syntax">
|
|
<phplint deprecatedAsError="true" haltonfailure="true">
|
|
<fileset dir="src">
|
|
<include name="**/*.php"/>
|
|
</fileset>
|
|
</phplint>
|
|
</target>
|
|
|
|
<target name="emoji:tests" description="Test some fully-qualified emojis">
|
|
<autoloader autoloaderpath="vendor/autoload.php"/>
|
|
<php function="vanilla"/>
|
|
</target>
|
|
|
|
<target name="emoji:count" description="Count constants in Emoji class">
|
|
<autoloader autoloaderpath="vendor/autoload.php"/>
|
|
<adhoc-task name="emoji-count">
|
|
class EmojiCountTask extends \Phing\Task {
|
|
function main() {
|
|
$emojiReflection = new ReflectionClass(\Jawira\EmojiCatalog\Emoji::class);
|
|
$constants = $emojiReflection->getConstants();
|
|
$count = count($constants);
|
|
$this->log("Emoji count: $count");
|
|
$this->project->setProperty('emoji-count', $count);
|
|
}
|
|
}
|
|
</adhoc-task>
|
|
<emoji-count/>
|
|
</target>
|
|
|
|
<target name="help">
|
|
<uptodate property="uptodate.visualizer" srcfile="build.xml" targetfile="build.png"/>
|
|
<runtarget target="visualizer"/>
|
|
<open path="build.png"/>
|
|
</target>
|
|
|
|
<target name="visualizer" unless="uptodate.visualizer" description="Create buildfile map">
|
|
<visualizer/>
|
|
</target>
|
|
|
|
</project>
|