lcuis / matomo_forever

A perennial Dart plugin to send data to a Matomo server with a Flutter example app.
MIT License
6 stars 2 forks source link

Kotlin-Gradle-Plugin outdated version #2

Closed netapy closed 1 year ago

netapy commented 1 year ago

Hi, thanks very much for this great library.

I'm trying to compile my app to Android and I get the following error :

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':matomo_forever' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1
Exited

My flutter doctor :

[✓] Flutter (Channel stable, 3.7.0, on Fedora Linux 37 (Workstation Edition) 6.1.7-200.fc37.x86_64, locale fr_FR.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.74.3)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
lcuis commented 1 year ago

Hello @netapy ,

Thanks a lot for your message and for raising this! I will try to reproduce and solve this issue as soon as possible.

lcuis commented 1 year ago

Salut @netapy ,

Version 1.0.4+1 of this plugin just published on pub.dev now got those lines updated:

android/build.gradle:

...
    ext.kotlin_version = '1.6.20'
...
        classpath 'com.android.tools.build:gradle:7.0.0'
...

android/gradle/wrapper/gradle-wrapper.properties:

...
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip

I hope this solves your issue.

If it doesn't, I'm very sorry for the inconvenience and you may want to try updating those lines in your own project, as can be seen also in the example project here: https://github.com/lcuis/matomo_forever/blob/dc8b3bd8f0baa534ebaf90f7205e59c20f392f66/example/android/build.gradle#L2 https://github.com/lcuis/matomo_forever/blob/dc8b3bd8f0baa534ebaf90f7205e59c20f392f66/example/android/build.gradle#L9 https://github.com/lcuis/matomo_forever/blob/dc8b3bd8f0baa534ebaf90f7205e59c20f392f66/example/android/gradle/wrapper/gradle-wrapper.properties#L6

netapy commented 1 year ago

It works perfectly with your fix ! Thank you for being so responsive and efficient. Best,

lcuis commented 1 year ago

Great! Thanks a lot for your confirmation and again for bringing this issue to my attention!