Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
154 stars 114 forks source link

Gradle Too Old #143

Closed panalgin closed 11 months ago

panalgin commented 12 months ago

It seems like I can't get this package to work with my project in flutter 3.10.5.

I have my project in gradle 7.4.2, and java/kotlin source compatibility is set to

        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }

    kotlinOptions {
        jvmTarget = "17"
    }

As other packages / current agp gradle thing requires it.

But emoji_picker_flutter requires javaVersion 1.8 which breaks the project. Is there something I'm doing wrong or should we update gradle version on this package as a solution?

I'm getting the following error and I have tried all the recommended solutions

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':emoji_picker_flutter: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
Fintasys commented 12 months ago

Mh the project has javaVersion nowhere specified. Also Gradle with 7.3.0 is relative up-to-date and support java 17.

The only thing I found is that shared_preferences package that my package is based on has 1.8 setting set. https://github.com/flutter/packages/blob/main/packages/shared_preferences/shared_preferences_android/android/build.gradle

panalgin commented 12 months ago

I think it is due to some dependencies requiring java 1.8, I'm sure I saw that requirement for emoji_picker_flutter package on android studio in build.gradle file, probably it's combined. I will make a test repo and will let you guys know

Fintasys commented 11 months ago

@panalgin how is it going?

panalgin commented 11 months ago

@Fintasys seems the problem is not occurring on a fresh flutter project, I'm closing the issue, thx