123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project default="generate.all"
- basedir="."
- name="org.yakindu.sct.doc.user"
- xmlns:if="ant:if"
- xmlns:unless="ant:unless"
- xmlns:artifact="antlib:org.eclipse.aether.ant">
- <!-- Include platform-specific or machine-specific properties, if any. -->
- <property file="local.properties" />
- <!-- The documentation source files located beneath this directory.
- They may be structured into folders of arbitrary depth. -->
- <property name="src.dir" value="src" />
- <!-- CSS files are located here. -->
- <property name="css.dir" value="css" />
- <!-- Root CSS file to be referenced by the generated HTML files. -->
- <property name="css.root.file" value="style.css" />
- <!-- Image files reside in subdirectories with the following name: -->
- <property name="img.dir" value="images" />
- <!-- Target directories for various output formats: -->
- <property name="help.dir" value="help" />
- <property name="html.dir" value="html" />
- <property name="pdf.dir" value="pdf" />
- <property name="epub.dir" value="epub" />
- <!-- Libraries used by various Ant tasks are located here: -->
- <property name="lib.dir" location="${basedir}/lib" />
- <!-- Aether Ant Tasks configuration -->
- <property name="aether.jar.version" value="1.0.0.v20140518" />
- <property name="aether.jar.checksum"
- value="9008c0c96390eacc0f7fdde542dacbd921f942dcd5c139465e21f8b583942edb995304025bb436cfeeea0b89698ef9dfccf8a027da68cd079669adea8cca381f" />
- <property name="aether.jar.src"
- value="http://search.maven.org/remotecontent?filepath=org/eclipse/aether/aether-ant-tasks/${aether.jar.version}/aether-ant-tasks-${aether.jar.version}-uber.jar" />
- <property name="aether.jar.file" value="${lib.dir}/aether-ant-tasks-uber.jar" />
- <!-- Wikitext download configuration -->
- <property name="wikitext.zip.version" value="1.0.0.v20140518" />
- <property name="wikitext.zip.checksum"
- value="00d8bf79a9d7baf20e46d2435dd4b6a9963317a2737c731d11029c96aa86f64e8540639b6eefa6f04b8103860f47ff74e998c71b57445179dc20ad7c2847417c" />
- <!--
- <property name="wikitext.zip.src"
- value="http://www.eclipse.org/downloads/download.php?file=/mylyn/snapshots/nightly/docs/wikitext-standalone-latest.zip" />
- -->
- <property name="wikitext.zip.src" value="file:///${basedir}/externals/wikitext.zip" />
- <property name="wikitext.zip.file" value="${lib.dir}/wikitext.zip" />
- <property name="wikitext.basename" value="wikitext-standalone" />
- <property name="wikitext.version" value="2.8.0-SNAPSHOT" />
- <!-- Remove generated stuff: -->
- <target name="clean">
- <delete includeemptydirs="true" failonerror="false">
- <fileset dir="${basedir}" defaultexcludes="false">
- <include name="${help.dir}/**" />
- <include name="${html.dir}/**" />
- <include name="${pdf.dir}/**" />
- <include name="${epub.dir}/**" />
- </fileset>
- </delete>
- </target>
- <!-- Download and unpack the wikitext standalone distribution. Unfortunately it is currently available as a nightly build only. -->
- <target name="wikitext.download" description="Download and unpack the wikitext standalone distribution.">
- <condition property="wikitext.zip.file.exists">
- <and>
- <available file="${wikitext.zip.file}" />
- <checksum file="${wikitext.zip.file}"
- algorithm="SHA-512"
- property="${wikitext.zip.checksum}"
- verifyproperty="checksum.matches" />
- </and>
- </condition>
- <sequential unless:set="wikitext.zip.file.exists">
- <mkdir dir="${lib.dir}" />
- <get src="${wikitext.zip.src}"
- dest="${wikitext.zip.file}"
- skipexisting="false"
- usetimestamp="true"
- verbose="true" />
- <fail message="Checksum mismatch for ${wikitext.zip.file}. Please delete it and rerun ant to redownload.">
- <condition>
- <not>
- <checksum file="${wikitext.zip.file}"
- algorithm="SHA-512"
- property="${wikitext.zip.checksum}"
- verifyproperty="checksum.matches" />
- </not>
- </condition>
- </fail>
- <unzip dest="${lib.dir}" src="${wikitext.zip.file}" />
- </sequential>
- </target>
- <!-- Resolves the necessary dependencies: -->
- <target name="init.wikitext"
- description="Resolves the necessary wikitext dependencies."
- depends="wikitext.download">
- <property name="wikitext.dir" location="${lib.dir}/${wikitext.basename}-${wikitext.version}" />
- <path id="wikitext.classpath">
- <fileset dir="${wikitext.dir}">
- <include name="*.jar" />
- </fileset>
- </path>
- </target>
- <!-- Generates the documentation in all supported formats. -->
- <target name="generate.all"
- description="Generates the documentation in all supported formats."
- depends="generate.eclipsehelp" />
- <!-- Generates the documentation as Eclipse help. -->
- <target name="generate.eclipsehelp"
- description="Generates the documentation as separate Eclipse help (HTML) files from their respective textile (wikitext) sources."
- depends="init.wikitext">
- <sequential>
- <taskdef classpathref="wikitext.classpath"
- resource="org/eclipse/mylyn/wikitext/core/ant/tasks.properties" />
- <!-- Convert textile source files to HTML: -->
- <wikitext-to-eclipse-help markupLanguage="Textile"
- multipleOutputFiles="false"
- navigationImages="true"
- formatoutput="true"
- validate="true"
- failOnValidationError="true"
- failOnValidationWarning="false"
- title="YAKINDU Statechart Tools – Open Source Edition"
- helpPrefix="${help.dir}">
- <fileset dir="${src.dir}">
- <include name="**/*.textile" />
- </fileset>
- <stylesheet url="../${css.dir}/${css.root.file}" />
- </wikitext-to-eclipse-help>
- <!-- Files have been generated in the source directory, which is bad practice. Move them to the destination
- directory: -->
- <move todir="${help.dir}" flatten="no" verbose="no">
- <fileset dir="${src.dir}">
- <include name="**/*.html" />
- <include name="**/*-toc.xml" />
- </fileset>
- </move>
- <!-- Copy the CSS files to the destination directory: -->
- <copy todir="${help.dir}/${css.dir}">
- <fileset dir="${css.dir}">
- <include name="*" />
- </fileset>
- </copy>
- <!-- Copy the image files to the destination directory: -->
- <copy todir="${help.dir}">
- <fileset dir="src">
- <include name="**/${img.dir}/*" />
- </fileset>
- </copy>
- </sequential>
- </target>
- </project>
|