JS: drop support of old library format
This commit is contained in:
-11
@@ -1,11 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[unzip] Expanding: [TestData]/jslib-example.jar into [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
@@ -1,17 +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.jar"/>
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<libraries>
|
||||
<pathelement path="${library.path}"/>
|
||||
</libraries>
|
||||
</kotlin2js>
|
||||
<unzip src="${library.path}" dest="${temp}">
|
||||
<patternset>
|
||||
<include name="*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</patternset>
|
||||
</unzip>
|
||||
</target>
|
||||
</project>
|
||||
BIN
Binary file not shown.
-14
@@ -1,14 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val p = Pair(10, 20)
|
||||
val x = pairAdd(p)
|
||||
ok = "OK"
|
||||
println("x=$x")
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
Vendored
-11
@@ -1,11 +0,0 @@
|
||||
OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[copy] Copying 1 file to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Return code: 0
|
||||
-17
@@ -1,17 +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"/>
|
||||
<target name="build">
|
||||
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
|
||||
<libraries>
|
||||
<pathelement path="${library.path}"/>
|
||||
</libraries>
|
||||
</kotlin2js>
|
||||
<copy todir="${temp}">
|
||||
<fileset dir="${library.path}">
|
||||
<include name="**/*.js"/>
|
||||
<exclude name="META-INF/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</project>
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
package library.sample
|
||||
|
||||
public fun pairAdd(p: Pair<Int, Int>): Int = p.first + p.second
|
||||
|
||||
public fun pairMul(p: Pair<Int, Int>): Int = p.first * p.second
|
||||
|
||||
public data class IntHolder(val value: Int)
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Ant-Version: Apache Ant 1.9.1
|
||||
Created-By: 1.7.0_72-b14 (Oracle Corporation)
|
||||
Built-By: JetBrains
|
||||
Implementation-Vendor: JetBrains
|
||||
Implementation-Version: snapshot
|
||||
Specification-Title: Kotlin JavaScript Lib
|
||||
Kotlin-JS-Module-Name: jslib-example
|
||||
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
# jslib-example
|
||||
|
||||
Path to sources: compiler/testData/integration/ant/js/simpleWithStdlibAndFolderAsAnotherLib/jslib-example
|
||||
|
||||
The archive compiler/testData/integration/ant/js/simpleWithStdlibAndAnotherLib/jslib-example.jar should be updated after
|
||||
changing some files in source folder.
|
||||
-38
@@ -1,38 +0,0 @@
|
||||
this['jslib-example'] = function (Kotlin) {
|
||||
'use strict';
|
||||
var _ = Kotlin.defineRootPackage(null, /** @lends _ */ {
|
||||
library: Kotlin.definePackage(null, /** @lends _.library */ {
|
||||
sample: Kotlin.definePackage(null, /** @lends _.library.sample */ {
|
||||
pairAdd_bunuun$: function (p) {
|
||||
return p.first + p.second;
|
||||
},
|
||||
pairMul_bunuun$: function (p) {
|
||||
return p.first * p.second;
|
||||
},
|
||||
IntHolder: Kotlin.createClass(null, function (value) {
|
||||
this.value = value;
|
||||
}, /** @lends _.library.sample.IntHolder.prototype */ {
|
||||
component1: function () {
|
||||
return this.value;
|
||||
},
|
||||
copy_za3lpa$: function (value) {
|
||||
return new _.library.sample.IntHolder(value === void 0 ? this.value : value);
|
||||
},
|
||||
toString: function () {
|
||||
return 'IntHolder(value=' + Kotlin.toString(this.value) + ')';
|
||||
},
|
||||
hashCode: function () {
|
||||
var result = 0;
|
||||
result = result * 31 + Kotlin.hashCode(this.value) | 0;
|
||||
return result;
|
||||
},
|
||||
equals_za3rmp$: function (other) {
|
||||
return this === other || (other !== null && (typeof other === 'object' && (Object.getPrototypeOf(this) === Object.getPrototypeOf(other) && Kotlin.equals(this.value, other.value))));
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
});
|
||||
Kotlin.defineModule('jslib-example', _);
|
||||
return _;
|
||||
}(kotlin);
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
package foo
|
||||
|
||||
import library.sample.*
|
||||
|
||||
var ok = "FAIL"
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val p = Pair(10, 20)
|
||||
val x = pairAdd(p)
|
||||
ok = "OK"
|
||||
println("x=$x")
|
||||
}
|
||||
|
||||
fun box(): String = ok
|
||||
Reference in New Issue
Block a user