Custom lint classpath leaks across projects?

40 views
Skip to first unread message

David Burström

unread,
Sep 22, 2014, 7:15:02 AM9/22/14
to adt...@googlegroups.com
Hi!

I've noticed a case where using a custom lint jar for one project can fail lint invocations on other projects.

Prerequisites:
Android gradle 0.12.2
Android Build Tools 20.0.0
Android SDK Tools 23.0.2

Steps to reproduce:
1: Create two Android projects ("app" and "app2"), without any cross dependencies.
2: Create a project that builds a library jar with a custom lint check (e.g. looking for existence of an attribute in the AndroidManifest.xml).
3: Configure the "app" project so that it copies the custom lint check to "app/build/lint/lint.jar" (so lint picks it up), or copy it there manually.
4: Introduce a change that would cause a violation against the custom lint check in the "app2" project, .
5: Run "./gradlew app:lint app2:lint".

Expected result:
No violations found, as the lint jar is local to "app".

Actual result:
A violation is found

More:
If you run "./gradlew app:lint app:lint", there are no violations found, so this clearly depends on the order of execution.

Could it be that the library is added to a classpath that leaks across invocations of lint within the same gradle invocation?

:-David

Tor Norbye

unread,
Sep 23, 2014, 1:04:08 PM9/23/14
to adt...@googlegroups.com
Sounds like a bug; can you paste this into a bug report? (http://b.android.com, category Component-Tools) ?

--
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 adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Burström

unread,
Sep 24, 2014, 4:41:59 AM9/24/14
to adt...@googlegroups.com
Thanks, done!

:-David

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/FgovGXDg8vU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages