I have a `build.gradle.kts`
# announcements
r
I have a
build.gradle.kts
k
Well there's probably an equivalent syntax for that simple smile
r
Copy code
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
Ah right, I don't know what the issue is then.
r
I mean I just added all that, though it didnt fix my problem 😞
a
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
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?
Copy code
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.