<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (c) 2015-2016 JSC Invertor
 [http://www.sbp-invertor.ru]
 <p/>
 This file is part of JLibModbus.
 <p/>
 JLibModbus is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 <p/>
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 <p/>
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 <p/>
 Authors: <NAME>, software engineer.
 email: <EMAIL>
-->
<project name="JLibModbus" basedir="." default="jar">
	<property name="java.version" value="1.6"/>
	<property name="build.name" value="jlibmodbus"/>
	<property name="build.info" value="${basedir}${file.separator}project.properties"/>
    <property name="build.src" value="${basedir}${file.separator}src"/>
	<property name="build.packages" value="com.invertor.modbus.*"/>
    <property name="build.lib" value="${basedir}${file.separator}lib"/>
	<property name="build.dir" value="${basedir}${file.separator}build"/>
    <property name="build.classes" value="${build.dir}${file.separator}classes"/>
	<property name="build.javadoc" value="${build.dir}${file.separator}javadoc"/>
    <property file="build.properties"/>
	<property file="build.version"/>
	<property file="build.copyright"/>
	<property file="build.number"/>
	
	<property name="dist.dir" value="${basedir}${file.separator}dist"/>
	<tstamp>
		<format property="build.time" pattern="MM.dd.yyyy HH:mm" timezone="Asia/Yekaterinburg"/>
	</tstamp>        
	<property name="version" value="${build.version}.${build.number}"/>
	<property name="build.jar" value="${build.dir}/${build.name}-${version}.jar"/>
	<path id="build.classpath">
        <fileset dir="${build.lib}">
            <include name="*.jar"/>
        </fileset>
    </path>

	<condition property="build.sysinfo" value="Microsoft Windows">
		<os family="windows" />
	</condition>
		
	<target name="sysinfo" unless="build.sysinfo">
		<property name="exec.uname" value="uname" />
		<exec executable="${exec.uname}"  outputproperty="build.sysinfo"><arg value="-a"/></exec>
	</target>

	<target name="init" depends="sysinfo">
		<property name="exec.whoami" value="whoami"/>
		<exec executable="${exec.whoami}" outputproperty="build.user"/>
	</target>
	
	<target name="buildinfo" depends="init">
		<delete file="${build.info}"/>
		<propertyfile file="${build.info}"
			comment="DO NOT EDIT - this file is automatically generated.">        
			<entry key="buildtime" value="${build.time}"/>
			<entry key="builder" value="${build.user}"/>
			<entry key="version" value="${version}"/>
			<entry key="system" value="${build.sysinfo}"/>
		</propertyfile>
	</target>

	<target name="prepare-build" depends="clean-build,buildinfo">
		<mkdir dir="${build.dir}"/>
	</target>
	
    <target name="compile" description="compiles the source files" depends="clean-classes,prepare-build">
		<echo level="info"
			message="
			Project name: ${ant.project.name} ${line.separator}
			Build time:   ${build.time}       ${line.separator}
			User:         ${build.user}       ${line.separator}
			System:       ${build.sysinfo}    ${line.separator}
			"
		/>
        <mkdir dir="${build.classes}"/>
        <javac includeantruntime="false"
			encoding="UTF-8" 
			srcdir="${build.src}" 
			destdir="${build.classes}"
			debug="${build.debug}"
			optimize="${build.optimize}"
			deprecation="${build.deprecation}">
            <classpath refid="build.classpath"/>
        </javac>
    </target>
	<target name="jar" depends="clean-jar,compile">
		<jar destfile="${build.jar}" basedir="${build.classes}"/>
	</target>
	<target name="javadoc" description="generates the javadoc documentation." depends="clean-javadoc,prepare-build">
    <mkdir dir="${build.javadoc}"/>
    <javadoc packagenames="${build.packages}"
		encoding="UTF-8" 
      sourcepath="${build.src}"
      classpath="${build.classpath}"
      destdir="${build.javadoc}"
      author="true"
      version="true"
      windowtitle="${ant.project.name}"
      doctitle="${ant.project.name} API documentation"
      header="&lt;a href=&apos;http://jlibmodbus.sourceforge.net&apos; target=&apos;_top&apos;&gt;jlibmodbus at sourceforge.net&lt;/a&gt;"
      bottom="${build.copyright}"
      /><commit_msg>added an echo generating a class to obtain the version of the library.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!-- 
 Copyright (c) 2015-2016 JSC Invertor
 [http://www.sbp-invertor.ru]
 <p/>
 This file is part of JLibModbus.
 <p/>
 JLibModbus is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 <p/>
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 <p/>
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 <p/>
 Authors: <NAME>, software engineer.
 email: <EMAIL>
-->
<project name="JLibModbus" basedir="." default="jar">
	<property name="java.version" value="1.6"/>
	<property name="build.name" value="jlibmodbus"/>
	<property name="build.info" value="${basedir}${file.separator}project.properties"/>
    <property name="build.src" value="${basedir}${file.separator}src"/>
	<property name="build.packages" value="com.invertor.modbus.*"/>
    <property name="build.lib" value="${basedir}${file.separator}lib"/>
	<property name="build.dir" value="${basedir}${file.separator}build"/>
    <property name="build.classes" value="${build.dir}${file.separator}classes"/>
	<property name="build.javadoc" value="${build.dir}${file.separator}javadoc"/>
    <property file="build.properties"/>
	<property file="build.version"/>
	<property file="build.copyright"/>
	<property file="build.number"/>
	
	<property name="dist.dir" value="${basedir}${file.separator}dist"/>
	<tstamp>
		<format property="build.time" pattern="MM.dd.yyyy HH:mm" timezone="Asia/Yekaterinburg"/>
	</tstamp>        
	<property name="version" value="${build.version}.${build.number}"/>
	<property name="build.jar" value="${build.dir}/${build.name}-${version}.jar"/>
	<path id="build.classpath">
        <fileset dir="${build.lib}">
            <include name="*.jar"/>
        </fileset>
    </path>

	<condition property="build.sysinfo" value="Microsoft Windows">
		<os family="windows" />
	</condition>
		
	<target name="sysinfo" unless="build.sysinfo">
		<property name="exec.uname" value="uname" />
		<exec executable="${exec.uname}"  outputproperty="build.sysinfo"><arg value="-a"/></exec>
	</target>

	<target name="init" depends="sysinfo">
		<property name="exec.whoami" value="whoami"/>
		<exec executable="${exec.whoami}" outputproperty="build.user"/>
	</target>
	
	<target name="buildinfo" depends="init">
		<delete file="${build.info}"/>
		<propertyfile file="${build.info}"
			comment="DO NOT EDIT - this file is automatically generated.">        
			<entry key="buildtime" value="${build.time}"/>
			<entry key="builder" value="${build.user}"/>
			<entry key="version" value="${version}"/>
			<entry key="system" value="${build.sysinfo}"/>
		</propertyfile>
	</target>

	<target name="prepare-build" depends="clean-build,buildinfo">
		<mkdir dir="${build.dir}"/>
	</target>
	
    <target name="compile" description="compiles the source files" depends="clean-classes,prepare-build">
		<echo level="info"
			message="
			Project name: ${ant.project.name} ${line.separator}
			Build time:   ${build.time}       ${line.separator}
			User:         ${build.user}       ${line.separator}
			System:       ${build.sysinfo}    ${line.separator}
			"
		/>
		<echo file="${build.src}${file.separator}com${file.separator}invertor${file.separator}modbus${file.separator}Version.java" append="false">
package com.invertor.modbus;
/**
 * A class to keep the current version in
 *
 * @since 1.2.3
 */
class Version {
	
	private static final String version = "${version}";
	/**
	 * returns the current version of the JLibModbus library
	 *
	 * @return a string representing the version
	 */
	public static String getVersion() {
		return version;
	}
}
		</echo>
        <mkdir dir="${build.classes}"/>
        <javac includeantruntime="false"
			encoding="UTF-8" 
			srcdir="${build.src}" 
			destdir="${build.classes}"
			debug="${build.debug}"
			optimize="${build.optimize}"
			deprecation="${build.deprecation}">
            <classpath refid="build.classpath"/>
        </javac>
    </target>
	<target name="jar" depends="clean-jar,compile">
		<jar destfile="${build.jar}" basedir="${build.classes}"/>
	</target>
	<target name="javadoc" description="generates the javadoc documentation." depends="clean-javadoc,prepare-build">
    <mkdir dir="${build.javadoc}"/>
    <javadoc packagenames="${build.packages}"
		encoding="UTF-8" 
      sourcepath="${build.src}"
      classpath="${build.classpath}"
      destdir="${build.javadoc}"
      author="true"
      version="true"
      windowtitle="${ant.project.name}"
      doctitle="${ant.project.name} API documentation"
      header="&lt;a href=&apos;http://jlibmodbus.sourceforge.net&apos; target=&apos;_top&apos;&gt;jlibmodbus at sourceforge.net&lt;/a&gt;"
      bottom="${build.copyright}"
      />
{'fraction_non_alphanumeric': 0.18176248340651485, 'fraction_numerical': 0.0035739814152966403, 'mean_word_length': 4.305525460455038, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 2, '>': 151, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, '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': '3970118', 'n_tokens_mistral': 3188, 'n_tokens_neox': 2973, 'n_words': 700}