Correct, lint currently only looks at the gradle parse tree *for that check*, but it also has the model available, so it should be relatively straightforward to also check version numbers from the computed model. One significant complication with that, and the reason that it operates on the parse tree instead, is that it's much harder to map this back to the source files when dealing with the model. But that's not an insurmountable problem, and I guess it could for example attach other dependency problems that it only finds in the model to for example the dependencies block in the build script (if found) or if not the build script or even the project itself.
On Tue, May 6, 2014 at 7:04 AM, Szczepan Faber <[email protected]> wrote: > Hey guys, > > Lint is such a nice tool. One of the things it does it tells me that "A > newer version of com.android.support:support-v4 than 13.0.+ is available: > x". However, this check seems to be dependent on the format of the > dependency declaration in the build.gradle file: > > dependencies { > compile "com.android.support:support-v4:13.0.+" //yields lint warning > compile spec.external.androidSupport //dependency via some custom > object - no warning :( > } > > I assume that lint parses the build script and it does not really use the > Gradle model (tooling api, etc.). Hence, lint does not support all kinds of > ways of configuring dependencies in the build script. Can you confirm? > (btw. I'm not complaining - I'm just curious. Lint is very useful!). > > Cheers! > > -- > You received this message because you are subscribed to the Google Groups > "adt-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
