JakeWharton / timber

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
https://jakewharton.github.io/timber/docs/5.x/
Apache License 2.0
10.41k stars 959 forks source link

Lint Failure in CLI #409

Closed avalanchas closed 3 years ago

avalanchas commented 3 years ago

Description

I am currently seeing an error in the Lint Report of my build pipeline. A quick check did not reveal anything similar here in the issues, and Google also does not seem to have anything on this yet. I know that I am working on the bleeding edge of tool versions (check versions below), so I expect some hickups.

I am not sure whether this can even be fixed through Timber, my suspicions are more towards the new Android Gradle Plugin, but we'll see. Here is an abbreviated version of the error message, for readability please find the full message here

../../src/main/java/.../Helper.java: The lint detector
timber.lint.WrongTimberUsageDetector
called context.getMainProject() during module analysis.
[...]
Contact the vendor of the lint issue to get it fixed/updated 
[...]
Issue Vendors:
Identifier: jetified-timber-4.7.1

Call stack: Context.getMainProject(Context.kt:117)
←WrongTimberUsageDetector.visitMethod(WrongTimberUsageDetector.java:80)
[...]

How to reproduce

I am still working on checking which things to roll back for the message to go away. More details to follow here if I find them

Versions

Timber: 4.7.1 Android Tools Build Gradle: 7.0.0-alpha14 Gradle: 7.0 CompileSdk: 30 TargetSdk: 30 Java Version (source_compatibility): 1.8

JakeWharton commented 3 years ago

Seems the same as #408