[JS] Remove Ant js test
This commit is contained in:
committed by
Space Team
parent
b0b266b73d
commit
0ac0c51c23
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/hello.kt] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,10 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/hello.kt" output="${temp}/out.js">
|
||||
<compilerarg value="-Xno-inline"/>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,13 +0,0 @@
|
||||
package foo
|
||||
|
||||
inline fun foo(f: () -> Unit) = f()
|
||||
|
||||
var ok = "Fail"
|
||||
|
||||
fun main() {
|
||||
foo {
|
||||
ok = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,12 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1"
|
||||
output="${temp}/out.js"
|
||||
outputPrefix="${test.data}/prefix"
|
||||
outputPostfix="${test.data}/postfix">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
/*
|
||||
some postfix
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
/*
|
||||
some prefix
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,3 +0,0 @@
|
||||
package bar
|
||||
|
||||
fun bar() {}
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1, [TestData]/bar.kt, [TestData]/root2/Foo.kt] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,15 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" >
|
||||
<src>
|
||||
<pathelement path="${test.data}/bar.kt"/>
|
||||
<fileset dir="${test.data}/root2">
|
||||
<include name="**/*.kt"/>
|
||||
</fileset>
|
||||
</src>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,7 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String {
|
||||
Foo()
|
||||
bar.bar()
|
||||
return "OK"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
function Bar () {}
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
class Foo
|
||||
@@ -1,13 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
|
||||
ERR:
|
||||
|
||||
BUILD FAILED
|
||||
[TestData]/build.xml:5: "output" should be specified
|
||||
|
||||
Total time: [time]
|
||||
|
||||
Return code: 1
|
||||
@@ -1,7 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,13 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
|
||||
ERR:
|
||||
|
||||
BUILD FAILED
|
||||
[TestData]/build.xml:5: "src" should be specified
|
||||
|
||||
Total time: [time]
|
||||
|
||||
Return code: 1
|
||||
@@ -1,7 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js output="${temp}/out.js"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPostfix="${test.data}/postfix">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
/*
|
||||
some postfix
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPrefix="${test.data}/prefix">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
/*
|
||||
some prefix
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,15 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<target name="build">
|
||||
<java dir="${temp}" fork="true" classname="org.jetbrains.kotlin.cli.js.K2JSCompiler">
|
||||
<classpath>
|
||||
<pathelement location="${kotlin.lib}/kotlin-compiler.jar"/>
|
||||
<pathelement location="${kotlin.lib}/kotlin-stdlib.jar"/>
|
||||
</classpath>
|
||||
<arg value="${test.data}/root1/foo.kt"/>
|
||||
<arg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
<arg value="-output"/>
|
||||
<arg value="out.js"/>
|
||||
<jvmarg value="-noverify"/>
|
||||
</java>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
package foo
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
val hello = Pair("Hello", "World")
|
||||
|
||||
fun main() {
|
||||
ok = "OK"
|
||||
println(hello.first + " " + hello.second)
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
(function(global) {
|
||||
var modules = {};
|
||||
modules.kotlin = kotlin;
|
||||
|
||||
// Hard-code expected dependency order since we are unable to refer to modules by filename here.
|
||||
var names = ["jslib-example", "out"];
|
||||
|
||||
function define(name, dependencies, body) {
|
||||
if (Array.isArray(name)) {
|
||||
body = dependencies;
|
||||
dependencies = name;
|
||||
name = names.shift();
|
||||
}
|
||||
else {
|
||||
if (name !== names.shift()) throw new Error("Unexpected dependency")
|
||||
}
|
||||
var resolvedDependencies = [];
|
||||
var currentModule = {};
|
||||
modules[name] = currentModule;
|
||||
for (var i = 0; i < dependencies.length; ++i) {
|
||||
var dependencyName = dependencies[i];
|
||||
resolvedDependencies[i] = dependencyName === 'exports' ? currentModule : modules[dependencyName];
|
||||
}
|
||||
currentModule = body.apply(body, resolvedDependencies);
|
||||
if (currentModule) {
|
||||
modules[name] = currentModule;
|
||||
}
|
||||
}
|
||||
define.amd = {};
|
||||
|
||||
function require(name) {
|
||||
return modules[name];
|
||||
}
|
||||
|
||||
global.define = define;
|
||||
global.$kotlin_test_internal$ = {
|
||||
require : require
|
||||
};
|
||||
})(this);
|
||||
Vendored
-14
@@ -1,14 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[copy] Copying 2 files to [Temp]
|
||||
[copy] Copying 1 file to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
<property name="library.path" value="${test.data}/jslib-example"/>
|
||||
<property name="temp.library.path" value="${temp}/lib"/>
|
||||
<target name="build">
|
||||
<mkdir dir="${temp.library.path}"/>
|
||||
|
||||
<kotlin2js src="${library.path}" output="${temp.library.path}/jslib-example.js" metaInfo="true" moduleKind="umd">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call" moduleKind="amd">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example.meta.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${temp.library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${temp}" file="${test.data}/amd.js"/>
|
||||
</target>
|
||||
</project>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
import kotlin.js.Date
|
||||
|
||||
public class ClassA() {
|
||||
val value: Int = 100
|
||||
}
|
||||
|
||||
public fun Date.extFun(): Int = 100
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
import kotlin.js.Date
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main() {
|
||||
val x = ClassA().value
|
||||
if (x == 100) {
|
||||
ok = "OK"
|
||||
}
|
||||
val date = Date()
|
||||
println(date.extFun())
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
Vendored
-18
@@ -1,18 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
|
||||
[delete] Deleting: [Temp]/lib/jslib-example1.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example2.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example1.meta.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example2.meta.js
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[copy] Copying 1 file to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
<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="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</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">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${temp.library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
import kotlin.js.Date
|
||||
|
||||
public class ClassA() {
|
||||
val value: Int = 100
|
||||
}
|
||||
|
||||
public fun Date.extFun(): String = "Date.extFun"
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
public fun ClassA.extFun(): String = "ClassA.extFun"
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
import kotlin.js.Date
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main() {
|
||||
val x = ClassA().value
|
||||
if (x == 100 && Date().extFun() == "Date.extFun" && ClassA().extFun() == "ClassA.extFun") {
|
||||
ok = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,9 +0,0 @@
|
||||
package foo
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main() {
|
||||
ok = "OK"
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,10 +0,0 @@
|
||||
package foo
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main(args: kotlin.Array<kotlin.String>) {
|
||||
args.size
|
||||
ok = "OK"
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[copy] Copying 4 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
<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="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
|
||||
<pathelement path="${temp.library.path}/jslib-example2.meta.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${temp.library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
import kotlin.js.Date
|
||||
|
||||
public class ClassA() {
|
||||
val value: Int = 100
|
||||
}
|
||||
|
||||
public fun Date.extFun(): String = "Date.extFun"
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
public fun ClassA.extFun(): String = "ClassA.extFun"
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
import kotlin.js.Date
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main() {
|
||||
val x = ClassA().value
|
||||
if (x == 100 && Date().extFun() == "Date.extFun" && ClassA().extFun() == "ClassA.extFun") {
|
||||
ok = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,10 +0,0 @@
|
||||
package foo
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main(vararg args: kotlin.String) {
|
||||
args.size
|
||||
ok = "OK"
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[copy] Copying 2 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
<property name="library.path" value="${test.data}/jslib-example"/>
|
||||
<property name="temp.library.path" value="${temp}/lib"/>
|
||||
<target name="build">
|
||||
<mkdir dir="${temp.library.path}"/>
|
||||
|
||||
<kotlin2js src="${library.path}" noStdlib="true" output="${temp.library.path}/jslib-example.js" metaInfo="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
|
||||
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call">
|
||||
<libraries>
|
||||
<pathelement path="${temp.library.path}/jslib-example.meta.js"/>
|
||||
</libraries>
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${temp.library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
public class ClassA() {
|
||||
val value: Int = 100
|
||||
}
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main() {
|
||||
val x = ClassA().value
|
||||
if (x == 100) {
|
||||
ok = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" sourcemap="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,10 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" nowarn="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,13 +0,0 @@
|
||||
package foo
|
||||
|
||||
import kotlin.Any
|
||||
|
||||
fun foo(p: Int??) {
|
||||
|
||||
}
|
||||
|
||||
interface T {
|
||||
abstract fun foo()
|
||||
}
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,13 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] logging: using Kotlin home directory [KotlinProjectHome]/dist/kotlinc
|
||||
[kotlin2js] logging: exception on loading scripting plugin: java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar
|
||||
[kotlin2js] logging: compiling source files: [TestData]/root1/foo.kt
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" verbose="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
@@ -1,11 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] info: kotlinc-js [KotlinVersion] (JRE [JREVersion])
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,9 +0,0 @@
|
||||
<project name="Ant Task Test" default="build">
|
||||
<taskdef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${kotlin.lib}/kotlin-ant.jar"/>
|
||||
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" printVersion="true">
|
||||
<compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
|
||||
</kotlin2js>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,3 +0,0 @@
|
||||
package foo
|
||||
|
||||
fun box(): String = "OK"
|
||||
Reference in New Issue
Block a user