https://kotlinlang.org logo
Title
r

Robert

04/09/2019, 8:51 PM
I have a
build.gradle.kts
k

karelpeeters

04/09/2019, 8:53 PM
Well there's probably an equivalent syntax for that 😒imple_smile:
r

Robert

04/09/2019, 8:54 PM
val compileTestKotlin: KotlinCompile by tasks

compileTestKotlin.kotlinOptions.jvmTarget = "1.8"
compileTestKotlin.kotlinOptions.jvmTarget = "1.8"

val compileKotlin: KotlinCompile by tasks

compileKotlin.kotlinOptions.jvmTarget = "1.8"

val compileJava: JavaCompile by tasks

compileJava.targetCompatibility = "1.8"
compileJava.sourceCompatibility = "1.8"

val compileTestJava: JavaCompile by tasks

compileTestJava.targetCompatibility = "1.8"
compileTestJava.sourceCompatibility = "1.8"
Should probably work 😛
k

karelpeeters

04/09/2019, 8:58 PM
Ah right, I don't know what the issue is then.
r

Robert

04/09/2019, 9:23 PM
I mean I just added all that, though it didnt fix my problem 😞
a

Alexey Belkov [JB]

04/10/2019, 8:10 AM
Does it change if you use the Gradle test runner in "Preferences | Build, Execution, Deployment | Build Tools | Gradle | Runner"? Do you have a Kotlin MPP project or a regular project? It also may be an IDEA bug, something like
<https://youtrack.jetbrains.com/issues/IDEA?q=%22requires%20target%20release%22%20-Resolved%20>
, but I haven't looked into it.
r

Robert

04/10/2019, 9:14 PM
Yes, it says
No tasks available
after clicking the green triangle. But it is also because I mixed
kotlin.test.*
and
io.kotlintest.*
. Which am I supposed to use?
class MyTest {
    @kotlin.test.Test
    fun testThis() {
I have now checked
delegate IDE build/run actions to gradle
And select
Platform test runner
. Then one level up called
Gradle
I configured
Delegate settings
to
Default
I'll test some more combinations.