blob: 4174195e8b1259085b088336050a69df8194d1d4 [file] [log] [blame]
<project name="Dokka" default="build">
<typedef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.compiler}/lib/kotlin-ant.jar"/>
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" classpath="${basedir}/lib/maven-ant-tasks-2.1.3.jar"/>
<property name="kotlinc.repeat" value="1"/>
<target name="clean">
<delete dir="out" />
<delete dir="maven-plugin/target" />
</target>
<target name="build">
<mkdir dir="out"/>
<kotlinc src="src" output="out/dokka.jar">
<compilerArg value="-Xrepeat"/>
<compilerArg value="${kotlinc.repeat}"/>
<classpath>
<fileset dir="lib" includes="*.jar"/>
</classpath>
</kotlinc>
</target>
<target name="fatjar" depends="build">
<jar jarfile="out/dokka-fat.jar">
<manifest>
<attribute name="Main-Class" value="org.jetbrains.dokka.DokkaPackage" />
</manifest>
<zipgroupfileset dir="lib">
<include name="**/*.jar" />
<include name="*.jar" />
</zipgroupfileset>
<zipfileset src="out/dokka.jar">
<include name="**/*" />
</zipfileset>
</jar>
</target>
<target name="install-fj" depends="fatjar">
<pom id="stupidpom"
groupid="org.jetbrains.dokka" artifactid="dokka-fatjar" version="1.0"
name="Dokka fatjar"
packaging="jar"
/>
<writepom pomrefid="stupidpom" file="out/dokka-fat.pom" />
<pom id="mypom" file="out/dokka-fat.pom" />
<install file="out/dokka-fat.jar" pomrefid="mypom">
<localrepository path="out/repo" />
</install>
</target>
<target name="build-and-install" depends="install-fj">
<mvn mavenversion="3.0.5" dir="maven-plugin" pom="maven-plugin/pom.xml">
<arg value="install" />
</mvn>
</target>
</project>