include the maps.js standard JS file in the maven plugin (fixing up issues caused by the refactoring of kotlin_lib.js into 2 files)
This commit is contained in:
@@ -79,6 +79,8 @@
|
||||
-->
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy tofile="${basedir}/target/generated-js-library/kotlin-maps.js"
|
||||
file="${kotlin-js-lib-srcdir}/../../js.translator/testFiles/maps.js"/>
|
||||
<copy tofile="${basedir}/target/generated-js-library/kotlin-lib.js"
|
||||
file="${kotlin-js-lib-srcdir}/../../js.translator/testFiles/kotlin_lib.js"/>
|
||||
<copy tofile="${basedir}/target/generated-js-library/kotlin-lib-ecma3.js"
|
||||
|
||||
+3
@@ -40,6 +40,7 @@ import java.util.List;
|
||||
* @noinspection UnusedDeclaration
|
||||
*/
|
||||
public class K2JSCompilerMojo extends KotlinCompileMojo {
|
||||
public static final String KOTLIN_JS_MAPS = "kotlin-maps.js";
|
||||
public static final String KOTLIN_JS_LIB = "kotlin-lib.js";
|
||||
public static final String KOTLIN_JS_LIB_ECMA3 = "kotlin-lib-ecma3.js";
|
||||
public static final String KOTLIN_JS_LIB_ECMA5 = "kotlin-lib-ecma5.js";
|
||||
@@ -96,6 +97,7 @@ public class K2JSCompilerMojo extends KotlinCompileMojo {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
appendFile(KOTLIN_JS_LIB_ECMA3, builder);
|
||||
appendFile(KOTLIN_JS_LIB, builder);
|
||||
appendFile(KOTLIN_JS_MAPS, builder);
|
||||
builder.append("\n");
|
||||
builder.append(text);
|
||||
Files.write(builder.toString(), file, charset);
|
||||
@@ -106,6 +108,7 @@ public class K2JSCompilerMojo extends KotlinCompileMojo {
|
||||
if (copyLibraryJS != null && copyLibraryJS.booleanValue()) {
|
||||
getLog().info("Copying kotlin JS library to " + outputKotlinJSDir);
|
||||
|
||||
copyJsLibraryFile(KOTLIN_JS_MAPS);
|
||||
copyJsLibraryFile(KOTLIN_JS_LIB);
|
||||
copyJsLibraryFile(KOTLIN_JS_LIB_ECMA3);
|
||||
copyJsLibraryFile(KOTLIN_JS_LIB_ECMA5);
|
||||
|
||||
Reference in New Issue
Block a user