<commit_before><!--
  Library which adds some macros to work with android SDK
  
  Created on: 18.09.2013
  Created by: <NAME> <<EMAIL>>
  History:
    18.09.2013
      - Creation of library
  -->
<project name="library_android">
  <property name="android.library.version" value="1.0.0" description="The current version of the library" />
  <dirname property="library_android.basedir" file="${ant.file.library_android}"/>

  <property name="android.library.resfile.template.project" value="${library_android.basedir}/library_android_eclipse_project.template" description="The name of the project template" />
  <property name="android.library.resfile.template.classpath" value="${library_android.basedir}/library_android_eclipse_classpath.template" description="The name of the classpath template" />
  
  <!--
    add the antcontrib library
    -->
  <taskdef resource="net/sf/antcontrib/antlib.xml" />
  
  <property name="android.init" value="false" description="For internal usage only, please do not modify this property by a file" />
  
  <property name="android.sdk.dir" value="" description="The sdk root directory, if empty it will be determined by the environment" />
  <property name="android.sdk.executable" value="android" description="The sdk executable" />
  
  <property name="android.dir.bin" value="bin" description="Folder to keep the binary files, generated by the compiler or eclipse" />
  <property name="android.dir.assets" value="assets" description="Folder to keep the assets, i.e. resources" />
  <property name="android.dir.res" value="res" description="Folder to keep the resources" />
  <property name="android.dir.libs" value="libs" description="Folder to keep the dependent libraries" />
  <property name="android.loc.eclipseclasses" value="${android.dir.bin}/classes" description="Location of the eclipse compiled classes" />
  <property name="android.file.projectfile" value="AndroidManifest.xml" description="Name of the file which indicates a android project" />
  <property name="android.file.projectproperties" value="project.properties" description="Property file for the android project" />
  <property name="android.force" value="false" description="Property to define if the project should always be completely updated, i.e. newly created" />
  
  <property name="android.default.target" value="" description="The default target to be used" />
  
  <!-- override some properties -->
  <property name="build.project.resources.dir" value="${android.dir.res}" description="Change the name of the resource folder" />
  <property name="build.binary.dir" value="${android.dir.bin}" description="Change the name of the binary folder" />
  <property name="eclipse.libdir" value="${android.dir.libs}" description="Change the folder to keep the dependent libraries" />
  
  <macrodef name="androidSetSdk">
    <sequential>
      <setLogLevel logLevel="error" />
      <taskdef resource="anttasks.properties" classpathref="android.antlibs" />
      <resetLogLevel />
    </sequential>
  </macrodef>
  
  <macrodef name="androidSetContrib">
    <sequential>
      <setLogLevel logLevel="error" />
      <taskdef resource="net/sf/antcontrib/antlib.xml" />
      <resetLogLevel />
    </sequential>
  </macrodef>
   
  <macrodef name="androidExec">
    <attribute name="command" />
    <attribute name="arguments" default="" />
    <attribute name="failonerror" default="true" />
    
    <sequential>
      
      <!-- reset any error -->
      <var name="tmp.androidExec.error" unset="true" />
    
      <!-- execute -->
      <if>
        <os family="windows" />
        <then>
          <exec dir="." executable="cmd" failonerror="@{failonerror}" errorproperty="tmp.androidExec.error">
            <arg line="/c ${android.sdk.executable} @{command} @{arguments}"/>
          </exec>
        </then>
        <else>
          <exec dir="." executable="/bin/sh" failonerror="@{failonerror}" errorproperty="tmp.androidExec.error">
            <arg value="-c" />
            <arg value="${android.sdk.executable} @{command} @{arguments}"/>
          </exec>
        </else>
      </if>
      
      <!-- check for errors -->
      <if>
        <and>
          <isset property="tmp.androidExec.error" />
          <not><equals arg1="${tmp.androidExec.error}" arg2="" /></not>
        </and>
        <then>
          <fail>${tmp.androidExec.error}</fail>
        </then>
      </if>
    </sequential>
  </macrodef>
  
  <macrodef name="androidUpdateProject">
    <sequential>   
      <androidExec command="update project" arguments="-p ." />
    </sequential><commit_msg>- added some output<commit_after><!--
  Library which adds some macros to work with android SDK
  
  Created on: 18.09.2013
  Created by: <NAME> <<EMAIL>>
  History:
    18.09.2013
      - Creation of library
  -->
<project name="library_android">
  <property name="android.library.version" value="1.0.0" description="The current version of the library" />
  <dirname property="library_android.basedir" file="${ant.file.library_android}"/>

  <property name="android.library.resfile.template.project" value="${library_android.basedir}/library_android_eclipse_project.template" description="The name of the project template" />
  <property name="android.library.resfile.template.classpath" value="${library_android.basedir}/library_android_eclipse_classpath.template" description="The name of the classpath template" />
  
  <!--
    add the antcontrib library
    -->
  <taskdef resource="net/sf/antcontrib/antlib.xml" />
  
  <property name="android.init" value="false" description="For internal usage only, please do not modify this property by a file" />
  
  <property name="android.sdk.dir" value="" description="The sdk root directory, if empty it will be determined by the environment" />
  <property name="android.sdk.executable" value="android" description="The sdk executable" />
  
  <property name="android.dir.bin" value="bin" description="Folder to keep the binary files, generated by the compiler or eclipse" />
  <property name="android.dir.assets" value="assets" description="Folder to keep the assets, i.e. resources" />
  <property name="android.dir.res" value="res" description="Folder to keep the resources" />
  <property name="android.dir.libs" value="libs" description="Folder to keep the dependent libraries" />
  <property name="android.loc.eclipseclasses" value="${android.dir.bin}/classes" description="Location of the eclipse compiled classes" />
  <property name="android.file.projectfile" value="AndroidManifest.xml" description="Name of the file which indicates a android project" />
  <property name="android.file.projectproperties" value="project.properties" description="Property file for the android project" />
  <property name="android.force" value="false" description="Property to define if the project should always be completely updated, i.e. newly created" />
  
  <property name="android.default.target" value="" description="The default target to be used" />
  
  <!-- override some properties -->
  <property name="build.project.resources.dir" value="${android.dir.res}" description="Change the name of the resource folder" />
  <property name="build.binary.dir" value="${android.dir.bin}" description="Change the name of the binary folder" />
  <property name="eclipse.libdir" value="${android.dir.libs}" description="Change the folder to keep the dependent libraries" />
  
  <macrodef name="androidSetSdk">
    <sequential>
      <setLogLevel logLevel="error" />
      <taskdef resource="anttasks.properties" classpathref="android.antlibs" />
      <resetLogLevel />
    </sequential>
  </macrodef>
  
  <macrodef name="androidSetContrib">
    <sequential>
      <setLogLevel logLevel="error" />
      <taskdef resource="net/sf/antcontrib/antlib.xml" />
      <resetLogLevel />
    </sequential>
  </macrodef>
   
  <macrodef name="androidExec">
    <attribute name="command" />
    <attribute name="arguments" default="" />
    <attribute name="failonerror" default="true" />
    
    <sequential>
      
      <!-- reset any error -->
      <var name="tmp.androidExec.error" unset="true" />
    
      <!-- execute -->
      <if>
        <os family="windows" />
        <then>
        <echo>---> ${sdk.dir}/tools/${android.sdk.executable}.bat</echo>
          <exec dir="." executable="cmd" failonerror="@{failonerror}" errorproperty="tmp.androidExec.error">
            <arg line="/c ${sdk.dir}/tools/${android.sdk.executable}.bat @{command} @{arguments}"/>
          </exec>
        </then>
        <else>
          <exec dir="." executable="/bin/sh" failonerror="@{failonerror}" errorproperty="tmp.androidExec.error">
            <arg value="-c" />
            <arg value="${android.sdk.executable} @{command} @{arguments}"/>
          </exec>
        </else>
      </if>
      
      <!-- check for errors -->
      <if>
        <and>
          <isset property="tmp.androidExec.error" />
          <not><equals arg1="${tmp.androidExec.error}" arg2="" /></not>
        </and>
        <then>
          <fail>${tmp.androidExec.error}</fail>
        </then>
      </if>
    </sequential>
  </macrodef>
  
  <macrodef name="androidUpdateProject">
    <sequential>   
      <androidExec command="update project" arguments="-p ." />
    </sequential>
{'fraction_non_alphanumeric': 0.15074241446094255, 'fraction_numerical': 0.004519044544867657, 'mean_word_length': 3.5231143552311437, 'pattern_counts': {'":': 0, '<': 169, '<?xml version=': 0, '>': 170, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '2640917', 'n_tokens_mistral': 2643, 'n_tokens_neox': 2583, 'n_words': 658}