IC: add destination dir to start of classpath instead of end

Otherwise IC fails when a project declares a class with the same name
as in one of its dependencies.
The issue is relevant only for non-JPS IC (Gradle, Maven, etc.),
but I added the test for JPS too.

  #KT-20516 fixed
This commit is contained in:
Alexey Tsvetkov
2018-03-21 14:35:57 +03:00
parent 55cbd28910
commit 605bcc66a1
26 changed files with 93 additions and 1 deletions
@@ -0,0 +1,17 @@
================ Step #1 =================
Building module1
Exit code: NOTHING_DONE
------------------------------------------
Building module2
Cleaning output files:
out/production/module2/META-INF/module2.kotlin_module
out/production/module2/UseAKt.class
out/production/module2/UseUtilsKt.class
End of files
Compiling files:
module2/src/useA.kt
module2/src/useUtils.kt
End of files
Exit code: OK
------------------------------------------
@@ -0,0 +1,2 @@
module1->
module2->module1
@@ -0,0 +1,3 @@
class A {
fun fizz() {}
}
@@ -0,0 +1,2 @@
fun other1() {
}
@@ -0,0 +1 @@
fun fizz() {}
@@ -0,0 +1,3 @@
class A {
fun buzz() {}
}
@@ -0,0 +1,2 @@
fun other2() {
}
@@ -0,0 +1,3 @@
fun useA() {
A().buzz()
}
@@ -0,0 +1,3 @@
fun useUtils() {
buzz()
}
@@ -0,0 +1 @@
fun buzz() {}