<commit_before><?xml version="1.0"?>
<project name="org.strategoxt.strategoxt" default="all">
	<import file="ant-contrib/strategoxt-antlib.xml" />

	<property name="sdf2bundle" value="${user.home}/.nix-profile" />
	<property name="nativepath" value="${sdf2bundle}/bin/" />

	<!-- <property name="version" value="0" /> -->
	<property name="revision" value="0" />

	<!-- Import Ant contrib -->
	<taskdef resource="net/sf/antcontrib/antlib.xml" />

	<!-- Import Stratego/XT Ant contributions -->
	<!-- <available property="contrib.available" resource="strategoxt-antlib.xml" />
	<typedef resource="strategoxt-antlib.xml" /> -->

	<!-- Import the properties file, containing e.g. the version number -->
	<property file="build.properties" />

	<!-- Location of the syntax folder -->
	<property name="syntax-dir" value="syntax" />
	<!-- Location of libraries folder -->
	<property name="libraries-dir" value="stratego-libraries" />

	<!-- Destination of files -->
	<!-- <property name="lib" location="lib/" /> -->
	<property name="bin" location="bin/" />
	<property name="test-gen" location="test-bin/" />

	<!-- For CI builds -->
	<property name="install-prefix-out" location="dist" />
	<property name="install-prefix" location="${install-prefix-out}" />
	<property name="install-location" location="${install-prefix}/share/strategoxt" />
	<property name="subdists-install-prefix" location="sub-dist" />

	<target name="all" depends="explain, build" />

	<target name="explain">
		<echo>Going to do a build</echo>
		<echo>- revision: ${revision}</echo>
		<echo>- version: ${version}</echo>
		<echo>- install output (install-prefix): ${install-prefix}</echo>
		<echo>- dependencies install output (subdists-install-prefix): ${subdists-install-prefix}</echo>
		<echo>- sdf2bundle from: ${sdf2bundle}</echo>
	</target>

	<target name="build">
		<mkdir dir="${subdists-install-prefix}" />
		<subant inheritall="false">
			<property name="install-prefix" location="${subdists-install-prefix}" />
			<property name="sdf2bundle" value="${sdf2bundle}" />
			<property name="nativepath" value="${nativepath}" />
			<fileset dir="syntax" includes="build.xml" />
			<target name="all" />
		</subant>
		<subant inheritall="false">
			<property name="install-prefix" location="${subdists-install-prefix}" />
			<property name="sdf2bundle" value="${sdf2bundle}" />
			<property name="nativepath" value="${nativepath}" />
			<property name="repository.syntax" location="${subdists-install-prefix}" />
			<property name="repository.libraries" location="${subdists-install-prefix}" />
			<fileset dir="stratego-libraries" includes="build.xml" />
			<target name="all" />
		</subant>
	</target>

	<target name="clean">
		<subant inheritall="false">
			<property name="install-prefix" location="${install-prefix}" />
			<fileset dir="syntax" includes="build.xml" />
			<target name="clean" />
		</subant>
		<subant inheritall="false">
			<property name="install-prefix" location="${install-prefix}" />
			<fileset dir="stratego-libraries" includes="build.xml" />
			<target name="clean" />
		</subant>
		<delete dir="${test-gen}" />
		<delete dir="${subdists-install-prefix}" />
		<delete dir="${bin}" />
	</target>

	<target name="jar" depends="build">
		<mkdir dir="${bin}" />
		<jar destfile="${bin}/strategoxt.jar" manifest="stratego-libraries/java-backend/java/META-INF/MANIFEST.MF" update="false">
			<fileset dir="." includes="COPYING" />
			<fileset dir="ant-contrib" includes="**/*.xml" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.class" />
			<zipgroupfileset dir="${subdists-install-prefix}" includes="**/*.jar" />
			<!-- <fileset dir="${subdists-install-prefix}" includes="**/*.rtree" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.af" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.tbl" /> -->
		</jar>
	</target>

	<target name="install" depends="jar">
		<copy file="${bin}/strategoxt.jar" todir="${install-location}" overwrite="true" verbose="true" />
		<mkdir dir="${install-prefix}/bin" />
		<copy todir="${install-prefix}/bin" verbose="true">
			<fileset dir="wrapper-scripts/unix/" includes="*" />
		</copy>
		<chmod dir="${install-prefix}/bin" includes="*" perm="a+rx" />
		<echo file="${install-prefix}/nix-support/hydra-build-products" append="true">nix-build out ${install-location}</echo>
		<echo file="${install-prefix}/nix-support/hydra-build-products" append="true">file jar ${install-location}/strategoxt.jar</echo>
	</target>


	<target name="test">
		<mkdir dir="${test-gen}" />
		<for param="deffile">
			<path>
				<fileset dir="${libraries-dir}" includes="sglr/tests/*.def" excludes="sglr/tests/List.def" />
			</path><commit_msg>Clean up of hydra build products<commit_after><?xml version="1.0"?>
<project name="org.strategoxt.strategoxt" default="all">
	<import file="ant-contrib/strategoxt-antlib.xml" />

	<property name="sdf2bundle" value="${user.home}/.nix-profile" />
	<property name="nativepath" value="${sdf2bundle}/bin/" />

	<!-- <property name="version" value="0" /> -->
	<property name="revision" value="0" />

	<!-- Import Ant contrib -->
	<taskdef resource="net/sf/antcontrib/antlib.xml" />

	<!-- Import Stratego/XT Ant contributions -->
	<!-- <available property="contrib.available" resource="strategoxt-antlib.xml" />
	<typedef resource="strategoxt-antlib.xml" /> -->

	<!-- Import the properties file, containing e.g. the version number -->
	<property file="build.properties" />

	<!-- Location of the syntax folder -->
	<property name="syntax-dir" value="syntax" />
	<!-- Location of libraries folder -->
	<property name="libraries-dir" value="stratego-libraries" />

	<!-- Destination of files -->
	<!-- <property name="lib" location="lib/" /> -->
	<property name="bin" location="bin/" />
	<property name="test-gen" location="test-bin/" />

	<!-- For CI builds -->
	<property name="install-prefix-out" location="dist" />
	<property name="install-prefix" location="${install-prefix-out}" />
	<property name="install-location" location="${install-prefix}/share/strategoxt" />
	<property name="subdists-install-prefix" location="sub-dist" />

	<target name="all" depends="explain, build" />

	<target name="explain">
		<echo>Going to do a build</echo>
		<echo>- revision: ${revision}</echo>
		<echo>- version: ${version}</echo>
		<echo>- install output (install-prefix): ${install-prefix}</echo>
		<echo>- dependencies install output (subdists-install-prefix): ${subdists-install-prefix}</echo>
		<echo>- sdf2bundle from: ${sdf2bundle}</echo>
	</target>

	<target name="build">
		<mkdir dir="${subdists-install-prefix}" />
		<subant inheritall="false">
			<property name="install-prefix" location="${subdists-install-prefix}" />
			<property name="sdf2bundle" value="${sdf2bundle}" />
			<property name="nativepath" value="${nativepath}" />
			<fileset dir="syntax" includes="build.xml" />
			<target name="all" />
		</subant>
		<subant inheritall="false">
			<property name="install-prefix" location="${subdists-install-prefix}" />
			<property name="sdf2bundle" value="${sdf2bundle}" />
			<property name="nativepath" value="${nativepath}" />
			<property name="repository.syntax" location="${subdists-install-prefix}" />
			<property name="repository.libraries" location="${subdists-install-prefix}" />
			<fileset dir="stratego-libraries" includes="build.xml" />
			<target name="all" />
		</subant>
	</target>

	<target name="clean">
		<subant inheritall="false">
			<property name="install-prefix" location="${install-prefix}" />
			<fileset dir="syntax" includes="build.xml" />
			<target name="clean" />
		</subant>
		<subant inheritall="false">
			<property name="install-prefix" location="${install-prefix}" />
			<fileset dir="stratego-libraries" includes="build.xml" />
			<target name="clean" />
		</subant>
		<delete dir="${test-gen}" />
		<delete dir="${subdists-install-prefix}" />
		<delete dir="${bin}" />
	</target>

	<target name="jar" depends="build">
		<mkdir dir="${bin}" />
		<jar destfile="${bin}/strategoxt.jar" manifest="stratego-libraries/java-backend/java/META-INF/MANIFEST.MF" update="false">
			<fileset dir="." includes="COPYING" />
			<fileset dir="ant-contrib" includes="**/*.xml" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.class" />
			<zipgroupfileset dir="${subdists-install-prefix}" includes="**/*.jar" />
			<!-- <fileset dir="${subdists-install-prefix}" includes="**/*.rtree" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.af" />
			<fileset dir="${subdists-install-prefix}" includes="**/*.tbl" /> -->
		</jar>
	</target>

	<target name="install" depends="jar">
		<copy file="${bin}/strategoxt.jar" todir="${install-location}" overwrite="true" verbose="true" />
		<mkdir dir="${install-prefix}/bin" />
		<copy todir="${install-prefix}/bin" verbose="true">
			<fileset dir="wrapper-scripts/unix/" includes="*" />
		</copy>
		<chmod dir="${install-prefix}/bin" includes="*" perm="a+rx" />
		<!-- <echo file="${install-prefix}/nix-support/hydra-build-products" append="true">nix-build out ${install-location}</echo>-->
		<echo file="${install-prefix}/nix-support/hydra-build-products" append="true">file jar ${install-location}/strategoxt.jar</echo>
	</target>


	<target name="test">
		<mkdir dir="${test-gen}" />
		<for param="deffile">
			<path>
				<fileset dir="${libraries-dir}" includes="sglr/tests/*.def" excludes="sglr/tests/List.def" />
			</path>
{'fraction_non_alphanumeric': 0.22138378148581145, 'fraction_numerical': 0.002550749282601764, 'mean_word_length': 4.685800604229607, 'pattern_counts': {'":': 0, '<': 224, '<?xml version=': 2, '>': 224, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 20}, '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': '471716', 'n_tokens_mistral': 3298, 'n_tokens_neox': 3022, 'n_words': 546}