JS: add tests for two libraries and js-file with two modules
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
<property name="library.path1" value="${test.data}/jslib-example1"/>
|
||||
<property name="library.path2" value="${test.data}/jslib-example2"/>
|
||||
<property name="temp.library.path" value="${temp}/lib"/>
|
||||
<target name="build">
|
||||
<mkdir dir="${temp.library.path}"/>
|
||||
|
||||
<kotlin2js src="${library.path1}" output="${temp.library.path}/jslib-example1.js" metaInfo="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
<kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="${temp.library.path}/jslib-example2.meta.js">
|
||||
<library>
|
||||
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
</library>
|
||||
</kotlin2js>
|
||||
|
||||
<concat destfile="${temp.library.path}/jslib-example.js">
|
||||
<fileset file="${temp.library.path}/jslib-example1.js"/>
|
||||
<fileset file="${temp.library.path}/jslib-example2.js"/>
|
||||
<fileset file="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
<fileset file="${temp.library.path}/jslib-example2.meta.js"/>
|
||||
</concat>
|
||||
|
||||
<delete file="${temp.library.path}/jslib-example1.js"/>
|
||||
<delete file="${temp.library.path}/jslib-example2.js"/>
|
||||
<delete file="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
<delete file="${temp.library.path}/jslib-example2.meta.js"/>
|
||||
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<library>
|
||||
<pathelement path="${temp.library.path}/jslib-example.js"/>
|
||||
</library>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${temp.library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
Reference in New Issue
Block a user