Skip to content

Instantly share code, notes, and snippets.

@huuphuoc1396
Last active March 26, 2021 07:51
Show Gist options
  • Save huuphuoc1396/b80c6593f286e35640d53d2659c8daf7 to your computer and use it in GitHub Desktop.
Save huuphuoc1396/b80c6593f286e35640d53d2659c8daf7 to your computer and use it in GitHub Desktop.
Fixing "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."
// Android App or Android Lib Module
plugins {
id(GradlePlugins.androidLib)
id(GradlePlugins.kotlinAndroid)
}
android {
kotlinOptions {
jvmTarget = "1.8"
}
}
// Java or Kotlin Lib Module
plugins {
id(GradlePlugins.javaLib)
id(GradlePlugins.kotlin)
}
project.tasks.withType(KotlinCompile::class.java).configureEach {
kotlinOptions {
jvmTarget = "1.8"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment