added a simple little CompilerPlugin interface and a loosely coupled loader of KDoc if its configured (via -docOutput) and its on the classpath then it can be used at the same stage as a compile & refactored KDoc to work with the compiler. Added a "docStdlib" goal to try out the kdoc on stdlib if the kdoc plugin has been built in kdoc/target/*.jar

This commit is contained in:
James Strachan
2012-02-22 13:28:08 +00:00
parent 10b2bd089c
commit e05d299874
9 changed files with 231 additions and 38 deletions
+17 -7
View File
@@ -48,12 +48,29 @@
</target>
<target name="compileStdlib" depends="jar">
<mkdir dir="${output}/classes/stdlib"/>
<java classname="org.jetbrains.jet.cli.KotlinCompiler" failonerror="true">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
<arg value="-src"/>
<arg value="${basedir}/stdlib/ktSrc"/>
<arg value="-output"/>
<arg value="${output}/classes/stdlib"/>
</java>
</target>
<target name="docStdlib">
<mkdir dir="${output}/classes/stdlib"/>
<mkdir dir="${output}/apidoc/stdlib"/>
<java classname="org.jetbrains.jet.cli.KotlinCompiler" failonerror="true">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
<fileset dir="${basedir}/kdoc/target">
<include name="**/*.jar"/>
</fileset>
</classpath>
<arg value="-src"/>
<arg value="${basedir}/stdlib/ktSrc"/>
@@ -70,13 +87,6 @@
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
<!--
<pathelement location="${kotlin-home}/lib/kotlin-runtime.jar"/>
<pathelement location="${basedir}/testlib/lib/junit-4.9.jar"/>
<fileset dir="${basedir}/testlib/lib">
<include name="**/*.jar"/>
</fileset>
-->
</classpath>
<arg value="-stdlib"/>
<arg value="${kotlin-home}/lib/kotlin-runtime.jar"/>