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
Provide better information for "Some input files use or override a deprecated API" #147831
Labels
P2
Important issues not at the top of the work list
platform-android
Android applications specifically
t: gradle
"flutter build" and "flutter run" on Android
team-tool
Owned by Flutter Tool team
tool
Affects the "flutter" command-line tool. See also t: labels.
triaged-tool
Triaged by Flutter Tool team
Comments
bartekpacia
added
t: gradle
"flutter build" and "flutter run" on Android
tool
Affects the "flutter" command-line tool. See also t: labels.
platform-android
Android applications specifically
team-android
Owned by Android platform team
P2
Important issues not at the top of the work list
labels
May 4, 2024
@bartekpacia |
@AbdeMohlbi Not directly, but once you follow the instructions it'll be easy to see what plugin is the offender: Example logs
|
Hmmmm tbh i never had the part were it says which plugin have a problem in wich class |
I guess ur using master branch maybee that's why |
The logs in my comment above assume that you've appended this code to subprojects.forEach { project ->
project.tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:deprecation']
}
} |
reidbaker
added
team-tool
Owned by Flutter Tool team
fyi-android
For the attention of Android platform team
triaged-android
Triaged by Android platform team
and removed
team-android
Owned by Android platform team
labels
May 9, 2024
flutter-triage-bot
bot
removed
fyi-android
For the attention of Android platform team
triaged-android
Triaged by Android platform team
labels
May 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P2
Important issues not at the top of the work list
platform-android
Android applications specifically
t: gradle
"flutter build" and "flutter run" on Android
team-tool
Owned by Flutter Tool team
tool
Affects the "flutter" command-line tool. See also t: labels.
triaged-tool
Triaged by Flutter Tool team
Use case
Many Flutter apps that depend on plugins often output the following messages when building for Android:
But it's not obvious at all how to actually "Recompile with -Xlint:deprecation". Recently a person asked this question in #147414, and I was motivated to find a solution.
Proposal
I suggest that flutter tool filters out all out these lines from its output:
But on the first occurence of such text, it prints a useful warning message, and suggest an action to take, e.g.:
If the project uses Gradle Kotlin DSL instead of Gradle Groovy DSL, the warning message adapts:
The text was updated successfully, but these errors were encountered: