Don't check the duplicated versions for imports

Consider this case:

cc_library {
    name: "foo",
    shared_libs: ["A-unstable-cpp", "B-unstable-cpp"],

aidl_interface {
    name: "A",
    imports: ["B"],

aidl_interface {
    name: "B",

Previously, the build system rejected this because the build graph is
foo -> A-unstable-cpp -> B-cpp
    -> B-unstable-cpp

, and therefore different versions of the aidl_interface B is detected
as duplicates.

This is happening just because the build system unconditionally chooses
the latest stable version (B-cpp here) for 'imports'. b/146436251

Until the bug is fixed, the version of an aidl_interface that is
introduced via imports are excluded from the duplication check.

Bug: 146436251
Test: build with ag/11860614
Change-Id: I70a07ce280970cb0ad5ab40174f8895a05eca2a6
1 file changed