refactored the maven plugin to use the vanilla K2JSCompiler directly and avoid using the K2JVMCompiler when generating JS code; also included a default LibrarySourceConfig which detects JS library code on the classpath which works nicer in maven/ant style worlds where dependencies tend to be specified rather than file paths to zip files
This commit is contained in:
@@ -30,8 +30,15 @@
|
||||
<delete dir="${basedir}/target/generated-js-library" failonerror="false" />
|
||||
<mkdir dir="${basedir}/target/generated-js-library"/>
|
||||
<copy todir="${basedir}/target/generated-js-library">
|
||||
<fileset dir="${kotlin-js-lib-srcdir}"/>
|
||||
<fileset dir="${kotlin-js-lib-srcdir}">
|
||||
<exclude name="core/dom/core.kt"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<!--
|
||||
|
||||
TODO this should compile soon hopefully :)
|
||||
disabled for now as it crashes the mvn plugin for JS goal
|
||||
|
||||
<copy todir="${basedir}/target/generated-js-library/kotlin">
|
||||
<fileset dir="${basedir}/../../stdlib/src/kotlin/dom">
|
||||
<include name="**/*.kt"/>
|
||||
@@ -41,10 +48,11 @@
|
||||
<include name="**/*.kt"/>
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
</fileset>
|
||||
<fileset file="${basedir}/../../stdlib/src/kotlin">
|
||||
<fileset dir="${basedir}/../../stdlib/src/kotlin">
|
||||
<include name="Preconditions.kt"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
-->
|
||||
<copy tofile="${basedir}/target/generated-js-library/kotlin-lib.js"
|
||||
file="${kotlin-js-lib-srcdir}/../../js.translator/testFiles/kotlin_lib.js"/>
|
||||
</target>
|
||||
|
||||
Reference in New Issue
Block a user