Skip to content

Rename lint into lintOptions #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

davidmartos96
Copy link
Contributor

Fixes #136

It appears that using the new keyword lint instead of lintOptions can break old AGP. Probably because it was deprecated in AGP 7.2

What I did is to bring back the original name. Official packages seem to be relying on the old keyword as well https://github.com/flutter/packages/blob/f8931024c4cb4ee0631527f11c2b6d4e2c1b65bc/packages/camera/camera_android/android/build.gradle#L40

Just to be sure I've also run the counter app with Flutter 2.8.0 which uses AGP 4.1.0 and is working fine now.
If you want to try it an old version of Android Studio is required. I've used Android Studio Dolphin 2021.3.1.

@pascalfriedrich
Copy link

I would be happy if the PR is merged, because Android cannot be built in our project. The PR contains the fix for this.

Flutter 3.16.7
Android SDK version 33.0.0
Gradle 7.6.1

@MisterJimson
Copy link
Owner

@pascalfriedrich what version of the lib are you using? It should now be working in 6.0.0

@pascalfriedrich
Copy link

@MisterJimson it's not working, I tried with 6.0.0. It says:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/pascal.friedrich/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/android/build.gradle' line: 37

* What went wrong:
A problem occurred evaluating project ':flutter_keyboard_visibility'.
> Could not find method disable() for arguments [InvalidPackage] on task ':flutter_keyboard_visibility:lint' of type com.android.build.gradle.tasks.LintGlobalTask.

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

@treacks5
Copy link

treacks5 commented Mar 21, 2024

Same error with version 6.0.0

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/damienlemenager/.pub-cache/hosted/pub.dev/flutter_keyboard_visibility-6.0.0/android/build.gradle' line: 37

* What went wrong:
A problem occurred evaluating project ':flutter_keyboard_visibility'.
> Could not find method disable() for arguments [InvalidPackage] on task ':flutter_keyboard_visibility:lint' of type com.android.build.gradle.tasks.LintGlobalTask.

* 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 16s
Error: Gradle task assembleDebug failed with exit code 1

flutter --version 👇

Flutter 3.19.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ba39319843 (2 weeks ago) • 2024-03-07 15:22:21 -0600
Engine • revision 2e4ba9c6fb
Tools • Dart 3.3.1 • DevTools 2.31.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment