Build multiplatform stdlib docs
This commit is contained in:
@@ -1035,13 +1035,13 @@
|
|||||||
<sequential>
|
<sequential>
|
||||||
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true" maxmemory="${max.heap.size.for.forked.jvm}">
|
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true" maxmemory="${max.heap.size.for.forked.jvm}">
|
||||||
<classpath>
|
<classpath>
|
||||||
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
|
<pathelement location="${bootstrap.compiler.home}/lib/kotlin-preloader.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<assertions>
|
<assertions>
|
||||||
<enable/>
|
<enable/>
|
||||||
</assertions>
|
</assertions>
|
||||||
<arg value="-cp"/>
|
<arg value="-cp"/>
|
||||||
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
<arg value="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"/>
|
||||||
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
|
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
|
||||||
<arg value="@{src}"/>
|
<arg value="@{src}"/>
|
||||||
<arg value="@{output}"/>
|
<arg value="@{output}"/>
|
||||||
|
|||||||
+37
-27
@@ -2,7 +2,8 @@
|
|||||||
<!-- Generates the standard library documentation using Dokka. -->
|
<!-- Generates the standard library documentation using Dokka. -->
|
||||||
<property name="github.revision" value="master"/>
|
<property name="github.revision" value="master"/>
|
||||||
<property name="dokka.path" value="../dependencies/dokka" />
|
<property name="dokka.path" value="../dependencies/dokka" />
|
||||||
<property name="output" value="${basedir}/doc" />
|
<property name="js.stdlib.src.path" value="../dependencies/js-stdlib-src" />
|
||||||
|
<property name="docs.output" value="${basedir}/doc" />
|
||||||
|
|
||||||
<typedef resource="dokka-antlib.xml">
|
<typedef resource="dokka-antlib.xml">
|
||||||
<classpath>
|
<classpath>
|
||||||
@@ -16,38 +17,47 @@
|
|||||||
</typedef>
|
</typedef>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
<delete dir="${output}"/>
|
<delete dir="${docs.output}"/>
|
||||||
<mkdir dir="${output}"/>
|
<mkdir dir="${docs.output}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<macrodef name="document-stdlib">
|
<target name="build-js-stdlib-sources">
|
||||||
<attribute name="jdk.version" />
|
<ant antfile="build.xml" target="pack-js-stdlib-sources" dir=".."/>
|
||||||
<attribute name="additional.src" default="" />
|
|
||||||
|
|
||||||
<sequential>
|
<delete dir="${js.stdlib.src.path}"/>
|
||||||
<echo message="Building stdlib docs for JRE @{jdk.version}" />
|
<unzip src="../dist/kotlinc/lib/kotlin-stdlib-js-sources.jar" dest="${js.stdlib.src.path}"/>
|
||||||
<dokka src="stdlib/src:@{additional.src}:../core/builtins:../core/reflection.jvm:../core/runtime.jvm/src/kotlin/jvm/annotations:../core/runtime.jvm/src/kotlin/jvm/JvmClassMapping.kt:../core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt"
|
</target>
|
||||||
samples="stdlib/samples/src" outputDir="${output}/jre@{jdk.version}" moduleName="kotlin-stdlib" skipDeprecated="true" outputFormat="kotlin-website" jdkversion="@{jdk.version}"
|
|
||||||
include="stdlib/src/Module.md">
|
|
||||||
<sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/>
|
|
||||||
</dokka>
|
|
||||||
<dokka src="kotlin.test/shared/src/main/kotlin:kotlin.test/shared/src/main/kotlin.jvm:kotlin.test/junit/src/main"
|
|
||||||
outputDir="${output}/jre@{jdk.version}" moduleName="kotlin-test" skipDeprecated="true" outputFormat="kotlin-website" jdkversion="@{jdk.version}">
|
|
||||||
<sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/>
|
|
||||||
</dokka>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<target name="document" depends="clean">
|
<target name="document" depends="clean,build-js-stdlib-sources">
|
||||||
<document-stdlib jdk.version="6" />
|
<dokka samples="stdlib/samples/test" outputDir="${docs.output}/jre8" moduleName="kotlin-stdlib" skipDeprecated="true" outputFormat="kotlin-website-samples" jdkversion="8" impliedplatforms="JVM,JS"
|
||||||
<document-stdlib jdk.version="7" additional.src="stdlib/jre7/src" />
|
include="stdlib/src/Module.md">
|
||||||
<document-stdlib jdk.version="8" additional.src="stdlib/jre7/src:stdlib/jre8/src" />
|
|
||||||
|
<sourceRoot path="stdlib/src" platforms="JVM"/>
|
||||||
|
<sourceRoot path="stdlib/jre7/src" platforms="JVM,JRE7"/>
|
||||||
|
<sourceRoot path="stdlib/jre8/src" platforms="JVM,JRE8"/>
|
||||||
|
<sourceRoot path="../core/builtins" platforms="JVM"/>
|
||||||
|
<sourceRoot path="../core/reflection.jvm" platforms="JVM"/>
|
||||||
|
<sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/annotations" platforms="JVM"/>
|
||||||
|
<sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/JvmClassMapping.kt" platforms="JVM"/>
|
||||||
|
<sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt" platforms="JVM"/>
|
||||||
|
|
||||||
|
<sourceRoot path="../core/builtins" platforms="JS"/>
|
||||||
|
<sourceRoot path="${js.stdlib.src.path}" platforms="JS"/>
|
||||||
|
|
||||||
|
<sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/>
|
||||||
|
</dokka>
|
||||||
|
<dokka outputDir="${docs.output}/jre8" moduleName="kotlin-test" skipDeprecated="true" outputFormat="kotlin-website-samples" jdkversion="8" impliedplatforms="JVM,JS">
|
||||||
|
|
||||||
|
<sourceRoot path="kotlin.test/common/src/main/kotlin" platforms="JVM,JS"/>
|
||||||
|
<sourceRoot path="kotlin.test/jvm/src/main/kotlin" platforms="JVM"/>
|
||||||
|
<sourceRoot path="kotlin.test/js/src/main/kotlin" platforms="JS"/>
|
||||||
|
|
||||||
|
<sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/>
|
||||||
|
</dokka>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="zip" depends="document">
|
<target name="zip" depends="document">
|
||||||
<zip destfile="target/stdlib-docs.zip" basedir="${output}/jre8/kotlin-stdlib"/>
|
<zip destfile="target/stdlib-docs.zip" basedir="${docs.output}/jre8/kotlin-stdlib"/>
|
||||||
<zip destfile="target/docs-jre6.zip" basedir="${output}/jre6"/>
|
<zip destfile="target/kotlin-test-docs.zip" basedir="${docs.output}/jre8/kotlin-test"/>
|
||||||
<zip destfile="target/docs-jre7.zip" basedir="${output}/jre7"/>
|
|
||||||
<zip destfile="target/docs-jre8.zip" basedir="${output}/jre8"/>
|
|
||||||
</target>
|
</target>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Reference in New Issue
Block a user