Test databinding/viewbinding
with Bazel 7.1.0
#164
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refine //tests/.. target to showcase databinding
Observations
When using Bazel 7.1.0 and associated
android_tools
, we get the following errorFrom a cursory look this seems to a dependency conflict between databinding's
jcommander
usage and Bazel's ownjcommander
version. Since everything is packaged into singleandroid_tools.jar
, the conflict occurs.Workarounds
When using an older version of
android_tools.jar
(6.3.2
) with Bazel7.1.0
, it seems we can overcome the error. This repo already uses6.3.2
jars hence this specific issue does not occur here. However this is not recommended since there could be other mismatches and we should be using the same version of android_tools and Bazel when we migrate to7.1.0
.Secondly the arg
true
does have a trailing space due to this not sure why in older versions boolean parsing appears succesfull