https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

timm

12/13/2018, 11:43 AM
In the pre 1.3 mpp layout i was able to have tests written in java in the JVM Project. is there a way to do this in the new layout? i tried
jvmTest/java
and
test/java
with the java plugin applied but neither seem to work
r

r4zzz4k

12/13/2018, 11:49 AM
Did you try to use
jvmWithJava
present instead of
jvm
one?
t

timm

12/13/2018, 11:50 AM
i thought that one was deprecated?
r

r4zzz4k

12/13/2018, 11:51 AM
Is it? I didn't look into multiplatform for a bit. It was always temporary, but I don't know if it's already can be replaced with
jvm
.
t

timm

12/13/2018, 11:55 AM
i ll try it then
now i get circular dependencies somehow:
Copy code
Circular dependency between the following tasks:
:classes
\--- :compileJava
     +--- :classes (*)
     \--- :compileKotlinJvm
          +--- :classes (*)
          \--- :compileKotlinJvm (*)
Okay now, it seems to work, thanks 🙂
I had added a dependency on the main sourceset before when using
jvm
only:
implementation project.sourceSets.main.output
Intellij still doesnt recognize the module in `jvmTest/java`though. Okay have to use
test/java
Now I cant reference the Kotlin classes form within the Java tests
r

r4zzz4k

12/13/2018, 12:16 PM
Huh, that's strange. Did you check YouTrack in terms of similar reports? I used
jvmWithJava
only to get proper integration with
application
and
shadow
plugins, which expect corresponding infrastructure, so I'm not sure if this would work in my setup, but it feels like a bug, of course.
t

timm

12/13/2018, 1:13 PM
TestKlass
in
src/test/java
does not compile
5 Views