hpoul / file_picker_writable

Flutter plugin to choose files which can be read, referenced and written back at a later time.
https://pub.dev/packages/file_picker_writable
MIT License
17 stars 12 forks source link

Kotlin JVM target issue #44

Open amake opened 2 months ago

amake commented 2 months ago

I just upgraded my app to Android Gradle Plugin 8 and I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':file_picker_writable:compileDebugKotlin'.
> 'compileDebugJavaWithJavac' task (current target is 1.8) and 'compileDebugKotlin' task (current target is 17) jvm target compatibility should be set to the same Java version.
  Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

There is probably a way I can set this for all subprojects in my own app, but it also seems you should have this in your build.gradle:

android {
    kotlinOptions {
        jvmTarget = '1.8'
    }
}
dkbast commented 1 week ago

I have the same issue, can confirm that the PR fixes it - would be great if this could be in a new patch release :)