|
2 | 2 | <!-- Generates the standard library documentation using Dokka. -->
|
3 | 3 | <property name="github.revision" value="master"/>
|
4 | 4 | <property name="dokka.path" value="../dependencies/dokka" />
|
5 |
| - <property name="output" value="${basedir}/doc" /> |
| 5 | + <property name="js.stdlib.src.path" value="../dependencies/js-stdlib-src" /> |
| 6 | + <property name="docs.output" value="${basedir}/doc" /> |
6 | 7 |
|
7 | 8 | <typedef resource="dokka-antlib.xml">
|
8 | 9 | <classpath>
|
|
16 | 17 | </typedef>
|
17 | 18 |
|
18 | 19 | <target name="clean">
|
19 |
| - <delete dir="${output}"/> |
20 |
| - <mkdir dir="${output}"/> |
| 20 | + <delete dir="${docs.output}"/> |
| 21 | + <mkdir dir="${docs.output}"/> |
21 | 22 | </target>
|
22 | 23 |
|
23 |
| - <macrodef name="document-stdlib"> |
24 |
| - <attribute name="jdk.version" /> |
25 |
| - <attribute name="additional.src" default="" /> |
26 |
| - |
27 |
| - <sequential> |
28 |
| - <echo message="Building stdlib docs for JRE @{jdk.version}" /> |
29 |
| - <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" |
30 |
| - samples="stdlib/samples/src" outputDir="${output}/jre@{jdk.version}" moduleName="kotlin-stdlib" skipDeprecated="true" outputFormat="kotlin-website" jdkversion="@{jdk.version}" |
31 |
| - include="stdlib/src/Module.md"> |
32 |
| - <sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/> |
33 |
| - </dokka> |
34 |
| - <dokka src="kotlin.test/shared/src/main/kotlin:kotlin.test/shared/src/main/kotlin.jvm:kotlin.test/junit/src/main" |
35 |
| - outputDir="${output}/jre@{jdk.version}" moduleName="kotlin-test" skipDeprecated="true" outputFormat="kotlin-website" jdkversion="@{jdk.version}"> |
36 |
| - <sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/> |
37 |
| - </dokka> |
38 |
| - </sequential> |
39 |
| - </macrodef> |
40 |
| - |
41 |
| - <target name="document" depends="clean"> |
42 |
| - <document-stdlib jdk.version="6" /> |
43 |
| - <document-stdlib jdk.version="7" additional.src="stdlib/jre7/src" /> |
44 |
| - <document-stdlib jdk.version="8" additional.src="stdlib/jre7/src:stdlib/jre8/src" /> |
| 24 | + <target name="build-js-stdlib-sources"> |
| 25 | + <ant antfile="build.xml" target="pack-js-stdlib-sources" dir=".."/> |
| 26 | + |
| 27 | + <delete dir="${js.stdlib.src.path}"/> |
| 28 | + <unzip src="../dist/kotlinc/lib/kotlin-stdlib-js-sources.jar" dest="${js.stdlib.src.path}"/> |
| 29 | + </target> |
| 30 | + |
| 31 | + <target name="document" depends="clean,build-js-stdlib-sources"> |
| 32 | + <dokka samples="stdlib/samples/test" outputDir="${docs.output}/jre8" moduleName="kotlin-stdlib" skipDeprecated="true" outputFormat="kotlin-website-samples" jdkversion="8" impliedplatforms="JVM,JS" |
| 33 | + include="stdlib/src/Module.md"> |
| 34 | + |
| 35 | + <sourceRoot path="stdlib/src" platforms="JVM"/> |
| 36 | + <sourceRoot path="stdlib/jre7/src" platforms="JVM,JRE7"/> |
| 37 | + <sourceRoot path="stdlib/jre8/src" platforms="JVM,JRE8"/> |
| 38 | + <sourceRoot path="../core/builtins" platforms="JVM"/> |
| 39 | + <sourceRoot path="../core/reflection.jvm" platforms="JVM"/> |
| 40 | + <sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/annotations" platforms="JVM"/> |
| 41 | + <sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/JvmClassMapping.kt" platforms="JVM"/> |
| 42 | + <sourceRoot path="../core/runtime.jvm/src/kotlin/jvm/PurelyImplements.kt" platforms="JVM"/> |
| 43 | + |
| 44 | + <sourceRoot path="../core/builtins" platforms="JS"/> |
| 45 | + <sourceRoot path="${js.stdlib.src.path}" platforms="JS"/> |
| 46 | + |
| 47 | + <sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/> |
| 48 | + </dokka> |
| 49 | + <dokka outputDir="${docs.output}/jre8" moduleName="kotlin-test" skipDeprecated="true" outputFormat="kotlin-website-samples" jdkversion="8" impliedplatforms="JVM,JS"> |
| 50 | + |
| 51 | + <sourceRoot path="kotlin.test/common/src/main/kotlin" platforms="JVM,JS"/> |
| 52 | + <sourceRoot path="kotlin.test/jvm/src/main/kotlin" platforms="JVM"/> |
| 53 | + <sourceRoot path="kotlin.test/js/src/main/kotlin" platforms="JS"/> |
| 54 | + |
| 55 | + <sourcelink path=".." url="http://github.com/JetBrains/kotlin/blob/${github.revision}" linesuffix="#L"/> |
| 56 | + </dokka> |
45 | 57 | </target>
|
46 | 58 |
|
47 | 59 | <target name="zip" depends="document">
|
48 |
| - <zip destfile="target/stdlib-docs.zip" basedir="${output}/jre8/kotlin-stdlib"/> |
49 |
| - <zip destfile="target/docs-jre6.zip" basedir="${output}/jre6"/> |
50 |
| - <zip destfile="target/docs-jre7.zip" basedir="${output}/jre7"/> |
51 |
| - <zip destfile="target/docs-jre8.zip" basedir="${output}/jre8"/> |
| 60 | + <zip destfile="target/stdlib-docs.zip" basedir="${docs.output}/jre8/kotlin-stdlib"/> |
| 61 | + <zip destfile="target/kotlin-test-docs.zip" basedir="${docs.output}/jre8/kotlin-test"/> |
52 | 62 | </target>
|
53 | 63 | </project>
|
0 commit comments