jps: support multiplatform incremental compilation for jvm and js

- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common
This commit is contained in:
Sergey Rostov
2018-04-03 13:00:06 +03:00
parent 4a6554a36d
commit 0eee2729cd
89 changed files with 5829 additions and 870 deletions
@@ -0,0 +1,3 @@
actual class X {
actual fun foo(): Any = 0
}
@@ -0,0 +1,3 @@
actual class Y {
actual fun foo(): Any = 0
}
@@ -0,0 +1,3 @@
actual class Z {
actual fun foo(): Any = 0
}
@@ -0,0 +1,19 @@
================ Step #1 =================
Compiling files:
src/X.kt
src/commonX.kt
src/useX.kt
End of files
Exit code: SUCCESS
================ Step #2 =================
Compiling files:
src/Y.kt
src/Z.kt
src/commonY.kt
src/commonZ.kt
src/useYZ.kt
End of files
Exit code: SUCCESS
@@ -0,0 +1,5 @@
expect class X {
fun foo(): Any
}
expect fun useX(x: X): Unit
@@ -0,0 +1,5 @@
expect class Y {
fun foo(): Any
}
expect fun useY(y: Y): Unit
@@ -0,0 +1,5 @@
expect class Z {
fun foo(): Any
}
expect fun useZ(z: Z): Unit
@@ -0,0 +1 @@
fun dummy() {}
@@ -0,0 +1,3 @@
actual fun useX(x: X): Unit {
x.foo()
}
@@ -0,0 +1,7 @@
actual fun useY(y: Y): Unit {
y.foo()
}
actual fun useZ(z: Z): Unit {
z.foo()
}
@@ -0,0 +1,3 @@
actual class X {
actual fun foo(): Any = 0
}
@@ -0,0 +1,3 @@
actual class Y {
actual fun foo(): Any = 0
}
@@ -0,0 +1,3 @@
actual class Z {
actual fun foo(): Any = 0
}
@@ -0,0 +1,19 @@
================ Step #1 =================
Compiling files:
src/X.kt
src/commonX.kt
src/useX.kt
End of files
Exit code: SUCCESS
================ Step #2 =================
Compiling files:
src/Y.kt
src/Z.kt
src/commonY.kt
src/commonZ.kt
src/useYZ.kt
End of files
Exit code: SUCCESS
@@ -0,0 +1,5 @@
expect class X {
fun foo(): Any
}
expect fun useX(x: X): Unit
@@ -0,0 +1,5 @@
expect class Y {
fun foo(): Any
}
expect fun useY(y: Y): Unit
@@ -0,0 +1,5 @@
expect class Z {
fun foo(): Any
}
expect fun useZ(z: Z): Unit
@@ -0,0 +1 @@
fun dummy() {}
@@ -0,0 +1,3 @@
actual fun useX(x: X): Unit {
x.foo()
}
@@ -0,0 +1,2 @@
fun useX(x: String): Int =
x.length
@@ -0,0 +1,7 @@
actual fun useY(y: Y): Unit {
y.foo()
}
actual fun useZ(z: Z): Unit {
z.foo()
}