Could someone please help me out with some gradle ...
# getting-started
m
Could someone please help me out with some gradle stuff? the issue I’m having is that apollo (graphql client) generates inline bytecode or somthing because I have an error that says :
Copy code
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6. Please specify proper '-jvm-target' option
Adding support for Java 8 language features could solve this issue.
The app is an kmm project. In both the shared build as the android build file is the compileOptions with javaversion 1.8 set but still getting the error I don’t know gradle that well and if I need to place this somewhere else let me know
t
Make sure you’re setting the
jvmTarget
option: https://kotlinlang.org/docs/gradle.html#attributes-specific-for-jvm Something like this with the gradle Kotlin DSL:
Copy code
tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs = listOf("-Xjsr305=strict")
        jvmTarget = "1.8"
    }
}
3
m
I’ve been trying to add the kotlinOptions but android studio keeps complaining that it does not exist same for the KotlinCompile I don’t know if I have something not in place or that my configuration doesn’t plain out work with the setup Thank you for your help edit: with the correct import of KotlinCompile it stoped complaining
👌 1