Open cwoodwar6 opened 6 years ago
@jin or anyone else on the Android team, wanted to check in and see if there has been any progress made on this or if we should be expecting anything relatively soon. My team at Square is looking to adopt Bazel and it would be a huge selling point if Android Lint with Bazel had decent performance as it is currently unusable with Gradle on our project.
Unfortunately, there's currently nobody working on Lint integration with Bazel, as the main efforts are on publishing the Android Starlark rules and the refreshed rulesets to rules_android.
cc @ahumesky
I've ported Android Lint to Buck recently, giving it a try with Bazel now.
Btw, we shouldn't tie Android Lint to android_library
and android_binary
rules, Android Lint runs absolutely fine on Java/Kotlin/resource targets too!
@artem-zinnatullin do you have any updates on your work. I'm curious if you could share your code.
Related - there exists a lintPublish
configuration in the android gradle plugin that's used to indicate a local lint check that should be packaged into the aar. This, as far as I can tell, just makes one large lint.jar
that's packaged in the aar. It would be good if android_library
could support this as well
I just took a really, really quick look at https://android.googlesource.com/platform/tools/base/+/studio-master-dev/bazel/lint.bzl and it looks like it might be possible to extract what has been done in this repo and re-use it. Did anyone try that?
Me and @artem-zinnatullin have plans to create a rule as part of the @buildfoundation, seems like at least running Lint checks can be achieved.
Did anyone make any progress on this?
We have a working solution that we've build internally for running Android Lint with Bazel, so it's possible (supports multiplexed workers).
It's also worth noting that there are some early rules checked into Bazel but the wrapper that drives most of the functionality hasn't been checked in. You can see parts of it here and here, and the missing tool that needs to be checked in would come from here.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage
) if you think this issue is still relevant or you are interested in getting the issue resolved.
@bazelbuild/triage, this issue is definitely still relevant and interesting to me, at least, and I'd guess others.
@Bencodes, any chance you'd be willing to release the internal one?
(@bazelbuild/triage didn't seem to create a tag last I tried (no link) so I'm going to also tag @sgowroji and @Pavank1992 manually. Please coach me if you'd have preferred otherwise--and maybe update the bot's instructions)
Description of the feature request:
Support for the Android Lint tool. This could be accomplished as a separate rule to perform the analysis on an
android_library
,android_binary
, etc.What underlying problem are you trying to solve with this feature?
Android projects built with Bazel would benefit from running the Android Lint tool to ensure code quality. Currently, it appears that this is only possible by using the tool directly or via another build system. Having this ability built into Bazel would simplify the process.
Have you found anything relevant by searching the web?
I found nothing and filed this to get more info if something for this already exists.