Java/Kotlin compatibility message

I receive this message at build time:

'compileJava' task and 'compileKotlin' task jvm target compatibility should be set to the same Java version

How do I change the 'compileKotlin' target jvm version?