This enables sharing of platform constraints between platform and kernel builds.
Bug: 304594734
Test: treehugger
Change-Id: I48091eeaf2e529c3f180ba056da3935911868b14
This CL adds java_version and sdk_version support to bp2build
converters for
- java library
- java binary
- android library
- android binary
- android library import
Although java import doesn't support java_version and sdk_version, the
neverlink java_library wrapper around a java_import must specify a
sdk_version when targetting a device. "none" is used by convention.
Change-Id: I22a69dea2e351858368df69ed6a703b568d613ea
Bug: 215230098
Test: Presubmits
Since we are putting conversion tests in the same
package as the module being converted from now on
Test: m bp2build
Change-Id: Ied53589d497fef70bfa11d8f6067459c9a50cd72
bp2buildTestCase
attrNameToString
runBp2BuildTestCase
makeBazelTargetNoRestrictions
The testing framework defined in the bp2build package can only be used
from within the package because many common testing functions are
private to the package. This prevents modules defined in Soong
plugins (e.g. system/tools/aidl/build) from testing bp2build conversions.
Test: go test ./bp2build
Change-Id: Ia867081327c5181d04687b13c4550e68e6a11f86
This CL also converts `external/rappor` (which already set `java_version` to `1.7`) to be bazelable to testify the changes.
Results from `b build //external/rappor && cat bazel-bin/external/rappor/librappor.jar-0.params`: https://paste.googleplex.com/5518725462622208.
Test: go test ./bp2build/...
Bug: 227618664
Change-Id: I8d370d4639f70fba51e6de6ceb7bcb5ace9ccd91
Soong modules that are specific for the host platform (e.g.
java_library_host, cc_binary_host, java_genrule_host, etc.) should
not be built on the target platform (Android), so we add a
target_compatible_with attribute to skip this type of module on an
Android target build.
Bug: 215229742
Test: go test ./bp2build
Change-Id: Ifb76ef4e0dc4cb3adb6a64b5c375ce36f7973e48
java_library_host, java_binary_host and cc_library_host_shared so
signapk tool can be built with Bazel.
Test: b build //build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal
Test: jarsigner -verify -verbose build.bazel.examples.apex.minimal.apex
Bug: 209876137
Bug: 196204358
Bug: 210158864
Bug: 210159074
Bug: 210158872
Change-Id: I855884159d25e69d8f9623792c376da820a1eb4c