<commit_before><?xml version="1.0" encoding="UTF-8"?>
<project name="DMDirc Plugins" default="default" basedir=".">
    <description>Builds, packages and tests DMDirc plugins.</description>

    <property name="plugins.src" location="src"/>
    <property name="plugins.build" location="build"/>
    <property name="plugins.build.classes" location="${plugins.build}/classes"/>
    <property name="plugins.build.metadata" location="${plugins.build}/metadata"/>
    <property name="plugins.dist" location="dist"/>
    <property name="plugins.lib" location="lib"/>

    <import file="build-ivy.xml" />
    <import file="build-tests.xml"/>

    <condition property="plugins.need.antlib">
       <not>
           <typefound name="foreach"/>
       </not>
    </condition>

    <target name="-init-taskdefs" depends="init-dependencies,-init-paths,-init-antlib,-init-git-describe">
    </target>

    <target name="-init-antlib" if="plugins.need.antlib">
        <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="plugins.classpath"/>
    </target>

    <target name="-init-git-describe">
        <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="plugins.classpath"/>
    </target>

    <target name="-init-paths">
      <path id="plugins.classpath">
         <pathelement path="${plugins.dmdirc.build.dir}"/>
         <fileset dir="${plugins.lib}" includes="**/*.jar"/>
      </path>

      <condition property="plugins.dmdirc.exists">
         <available classname="com.dmdirc.Main" classpathref="plugins.classpath"/>
      </condition>
    </target>

    <target name="-check-dmdirc-jar" unless="plugins.dmdirc.exists">
       <fail>DMDirc class files not found. Please put DMDirc on the classpath or specify the 'plugins.dmdirc.build.dir' property.</fail>
    </target>

    <target name="-init-compile" depends="init-dependencies,-init-paths,-check-dmdirc-jar">
       <mkdir dir="${plugins.build}"/>
       <mkdir dir="${plugins.build.classes}"/>
       <mkdir dir="${plugins.build.metadata}"/>
    </target>

    <target name="compile" depends="-init-compile">
       <javac srcdir="${plugins.src}" destdir="${plugins.build.classes}"
              classpathref="plugins.classpath" includeantruntime="false"
              debug="true"/>

       <copy todir="${plugins.build.classes}">
          <fileset dir="${plugins.src}">
             <exclude name="**/*.java"/>
             <exclude name="**/plugin.config"/>
          </fileset>
       </copy>
    </target>

    <target name="jar" depends="-package,-add-libs"/>

    <target name="-package" depends="-init-taskdefs,compile">
        <for param="configfile">
            <fileset dir="${plugins.src}" includes="**/plugin.config"/>
            <sequential>
                <local name="plugin.src.dir"/>
                <local name="plugin.build.dir"/>
                <local name="plugin.name"/>
                <local name="plugin.jar"/>
                <local name="plugin.version"/>

                <dirname file="@{configfile}" property="plugin.src.dir"/>
                <basename file="${plugin.src.dir}" property="plugin.name"/>
                <property name="plugin.jar" value="${plugins.dist}/${plugin.name}.jar"/>

                <if>
                    <not>
                        <uptodate targetfile="${plugin.jar}">
                            <srcfiles dir="${plugin.src.dir}" includes="*"/>
                        </uptodate><commit_msg>Re-enable warnings on plugins building<commit_after><?xml version="1.0" encoding="UTF-8"?>
<project name="DMDirc Plugins" default="default" basedir=".">
    <description>Builds, packages and tests DMDirc plugins.</description>

    <property name="plugins.src" location="src"/>
    <property name="plugins.build" location="build"/>
    <property name="plugins.build.classes" location="${plugins.build}/classes"/>
    <property name="plugins.build.metadata" location="${plugins.build}/metadata"/>
    <property name="plugins.dist" location="dist"/>
    <property name="plugins.lib" location="lib"/>

    <import file="build-ivy.xml" />
    <import file="build-tests.xml"/>

    <condition property="plugins.need.antlib">
       <not>
           <typefound name="foreach"/>
       </not>
    </condition>

    <target name="-init-taskdefs" depends="init-dependencies,-init-paths,-init-antlib,-init-git-describe">
    </target>

    <target name="-init-antlib" if="plugins.need.antlib">
        <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="plugins.classpath"/>
    </target>

    <target name="-init-git-describe">
        <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="plugins.classpath"/>
    </target>

    <target name="-init-paths">
      <path id="plugins.classpath">
         <pathelement path="${plugins.dmdirc.build.dir}"/>
         <fileset dir="${plugins.lib}" includes="**/*.jar"/>
      </path>

      <condition property="plugins.dmdirc.exists">
         <available classname="com.dmdirc.Main" classpathref="plugins.classpath"/>
      </condition>
    </target>

    <target name="-check-dmdirc-jar" unless="plugins.dmdirc.exists">
       <fail>DMDirc class files not found. Please put DMDirc on the classpath or specify the 'plugins.dmdirc.build.dir' property.</fail>
    </target>

    <target name="-init-compile" depends="init-dependencies,-init-paths,-check-dmdirc-jar">
       <mkdir dir="${plugins.build}"/>
       <mkdir dir="${plugins.build.classes}"/>
       <mkdir dir="${plugins.build.metadata}"/>
    </target>

    <target name="compile" depends="-init-compile">
       <javac srcdir="${plugins.src}" destdir="${plugins.build.classes}"
              classpathref="plugins.classpath" includeantruntime="false"
              debug="true" deprecation="true">
           <compilerarg value="-Xlint:all"/>
           <compilerarg value="-Xmaxwarns"/>
           <compilerarg value="1000"/>
           <compilerarg value="-Xmaxerrs"/>
           <compilerarg value="1000"/>
       </javac>

       <copy todir="${plugins.build.classes}">
          <fileset dir="${plugins.src}">
             <exclude name="**/*.java"/>
             <exclude name="**/plugin.config"/>
          </fileset>
       </copy>
    </target>

    <target name="jar" depends="-package,-add-libs"/>

    <target name="-package" depends="-init-taskdefs,compile">
        <for param="configfile">
            <fileset dir="${plugins.src}" includes="**/plugin.config"/>
            <sequential>
                <local name="plugin.src.dir"/>
                <local name="plugin.build.dir"/>
                <local name="plugin.name"/>
                <local name="plugin.jar"/>
                <local name="plugin.version"/>

                <dirname file="@{configfile}" property="plugin.src.dir"/>
                <basename file="${plugin.src.dir}" property="plugin.name"/>
                <property name="plugin.jar" value="${plugins.dist}/${plugin.name}.jar"/>

                <if>
                    <not>
                        <uptodate targetfile="${plugin.jar}">
                            <srcfiles dir="${plugin.src.dir}" includes="*"/>
                        </uptodate>
{'fraction_non_alphanumeric': 0.18007503126302626, 'fraction_numerical': 0.001945254967347506, 'mean_word_length': 2.6134538152610443, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 2, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3886602', 'n_tokens_mistral': 2114, 'n_tokens_neox': 2006, 'n_words': 349}