cloudacy / native_exif

A simple EXIF metadata reader/writer for Flutter.
MIT License
16 stars 15 forks source link

Package incompatible with AGP 4.2<= #19

Closed TiffApps closed 1 year ago

TiffApps commented 1 year ago

Hello, additionally (not fixed in the PR #20) I'm getting this error:

[ +176 ms] FAILURE: Build failed with an exception.
[        ] * What went wrong:
[        ] Execution failed for task ':native_exif: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
[        ] * Try:
[        ] > Run with --debug option to get more log output.
[        ] > Run with --scan to get full insights.
[        ] * Exception is:
[        ] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':native_exif:compileDebugKotlin'.

that I can fix it by adding

// ...

android {
    // ...

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
    kotlinOptions {
        jvmTarget = '17'
    }
    // ...
}

// ...

to my ...\AppData\Local\Pub\Cache\hosted\pub.dev\native_exif-0.4.1\android\build.gradle but it shouldn't require this normally, all the other packages are fine so it suggests Gradle configuration isn't well done in this package. It's also obviously bad to manually modify the cached packages.

d-kuen commented 1 year ago

Hi,

thank you for the PR.

We will have a look at the JVM part.