Added ant step for compilation Kotlin stdlib to JS.
This commit is contained in:
@@ -216,17 +216,42 @@
|
||||
</target>
|
||||
|
||||
<target name="jslib">
|
||||
<jar jarfile="${kotlin-home}/lib/kotlin-jslib.jar">
|
||||
<path id="js.lib">
|
||||
<fileset dir="${basedir}/js/js.libraries/src">
|
||||
<include name="core/**"/>
|
||||
<include name="jquery/**"/>
|
||||
<include name="dom/**"/>
|
||||
<include name="html5/**"/>
|
||||
<include name="stdlib/TuplesCode.kt"/>
|
||||
<include name="**/*.kt" />
|
||||
</fileset>
|
||||
|
||||
<fileset dir="${basedir}/core/reflection/src">
|
||||
<include name="kotlin/**"/>
|
||||
</fileset>
|
||||
|
||||
<fileset dir="${basedir}/libraries/stdlib/src">
|
||||
<include name="**/*.kt" />
|
||||
|
||||
<!-- JVM specific -->
|
||||
<exclude name="**/*JVM.kt" />
|
||||
<exclude name="kotlin/jvm/**" />
|
||||
<exclude name="kotlin/beans/**" />
|
||||
<exclude name="kotlin/browser/**" />
|
||||
<exclude name="kotlin/concurrent/**" />
|
||||
<exclude name="kotlin/io/**" />
|
||||
<exclude name="kotlin/math/**" />
|
||||
<exclude name="kotlin/template/**" />
|
||||
<exclude name="kotlin/util/**" />
|
||||
|
||||
<!-- Temporary disabled -->
|
||||
<!--TODO fix: (84, 27) Unresolved reference: copyOf (_SpecialJVM.kt)-->
|
||||
<exclude name="kotlin/collections/ImmutableArrayList.kt" />
|
||||
|
||||
<!-- TODO fix: AllModules is subclass of ThreadLocal. -->
|
||||
<exclude name="kotlin/modules/**" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<kotlin2js srcRef="js.lib" output="${basedir}/js/js.translator/testData/kotlin_lib_compiled.js" main="noCall" />
|
||||
|
||||
<jar jarfile="${kotlin-home}/lib/kotlin-jslib.jar">
|
||||
<path refid="js.lib" />
|
||||
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
||||
|
||||
<manifest>
|
||||
@@ -247,16 +272,19 @@
|
||||
prettyprint="true"
|
||||
languagein="ECMASCRIPT5_STRICT"
|
||||
warning="verbose"
|
||||
debug="false"
|
||||
output="${kotlin-home}/lib/kotlin.js">
|
||||
output="${kotlin-home}/lib/kotlin.js" >
|
||||
|
||||
<sources dir="${basedir}/js/js.translator/testData">
|
||||
<file name="kotlin_lib_ecma5.js"/>
|
||||
<file name="kotlin_lib.js"/>
|
||||
<file name="maps.js"/>
|
||||
<file name="long.js"/>
|
||||
<file name="kotlin_lib_compiled.js"/>
|
||||
</sources>
|
||||
|
||||
<externs dir="${basedir}/js/js.translator/testData">
|
||||
<file name="externs.js"/>
|
||||
</externs>
|
||||
</closure-compiler>
|
||||
</target>
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Externs for closure compiler
|
||||
|
||||
// from QUnit
|
||||
function ok() {}
|
||||
Reference in New Issue
Block a user