Open cavator opened 2 weeks ago
Good question! I also sometimes wondered how to see what the deprecations actually are, but never bothered to do it. But this issue motivated me to check it :)
Gradle Groovy DSL
Add the following code to android/build.gradle
:
subprojects.forEach { project ->
logger.quiet("Updating settings for project ${project}")
project.tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:deprecation']
}
}
Gradle Kotlin DSL
Add the following code to android/build.gradle.kts
:
subprojects.forEach { project ->
logger.quiet("Updating settings for project ${project}")
project.tasks.withType<JavaCompile> {
options.compilerArgs.addAll(listOf("-Xlint:deprecation"))
}
}
Then run flutter clean
(or a subset of it: ./gradlew clean
) and flutter build apk --debug
(or a subset of it: ./gradlew :app:assembleDebug
).
Here are the logs I got when building my app (which depends on firebase_auth: ^4.19.1
and location: ^6.0.1
:
Let me know if it helps!
Steps to reproduce
i only see people posting errors that show up this code, but i never se no one talking how to Recompile with -Xlint, i did not found anything useful on google. so how?
Expected results
.
Actual results
.
Code sample
.
Screenshots or Video
.
Logs
.
Flutter Doctor output
.