Merge changes I86f30b99,I2769c0d5 into main am: 3fb2002c9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2746855 Change-Id: Ie61359bea67a9afdf9e1e2e3e29568edfeccba79 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
3a9ce197a9
3 changed files with 23 additions and 4 deletions
|
@ -178,6 +178,7 @@ var (
|
||||||
"external/libjpeg-turbo": Bp2BuildDefaultTrueRecursively,
|
"external/libjpeg-turbo": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/libmpeg2": Bp2BuildDefaultTrueRecursively,
|
"external/libmpeg2": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/libpng": Bp2BuildDefaultTrueRecursively,
|
"external/libpng": Bp2BuildDefaultTrueRecursively,
|
||||||
|
"external/libphonenumber": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/libvpx": Bp2BuildDefaultTrueRecursively,
|
"external/libvpx": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/libyuv": Bp2BuildDefaultTrueRecursively,
|
"external/libyuv": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/lz4/lib": Bp2BuildDefaultTrue,
|
"external/lz4/lib": Bp2BuildDefaultTrue,
|
||||||
|
@ -1048,6 +1049,7 @@ var (
|
||||||
"libgmock_ndk", // depends on unconverted modules: libgtest_ndk_c++
|
"libgmock_ndk", // depends on unconverted modules: libgtest_ndk_c++
|
||||||
"libnativehelper_lazy_mts_jni", "libnativehelper_mts_jni", // depends on unconverted modules: libnativetesthelper_jni, libgmock_ndk
|
"libnativehelper_lazy_mts_jni", "libnativehelper_mts_jni", // depends on unconverted modules: libnativetesthelper_jni, libgmock_ndk
|
||||||
"libnativetesthelper_jni", // depends on unconverted modules: libgtest_ndk_c++
|
"libnativetesthelper_jni", // depends on unconverted modules: libgtest_ndk_c++
|
||||||
|
"libphonenumber_test", // depends on android.test.mock
|
||||||
"libstatslog", // depends on unconverted modules: libstatspull, statsd-aidl-ndk
|
"libstatslog", // depends on unconverted modules: libstatspull, statsd-aidl-ndk
|
||||||
"libstatslog_art", // depends on unconverted modules: statslog_art.cpp, statslog_art.h
|
"libstatslog_art", // depends on unconverted modules: statslog_art.cpp, statslog_art.h
|
||||||
"linker_reloc_bench_main", // depends on unconverted modules: liblinker_reloc_bench_*
|
"linker_reloc_bench_main", // depends on unconverted modules: liblinker_reloc_bench_*
|
||||||
|
|
|
@ -441,12 +441,13 @@ func TestJavaLibraryResourcesExcludeFile(t *testing.T) {
|
||||||
func TestJavaLibraryResourcesWithMultipleDirs(t *testing.T) {
|
func TestJavaLibraryResourcesWithMultipleDirs(t *testing.T) {
|
||||||
runJavaLibraryTestCase(t, Bp2buildTestCase{
|
runJavaLibraryTestCase(t, Bp2buildTestCase{
|
||||||
Filesystem: map[string]string{
|
Filesystem: map[string]string{
|
||||||
"res/a.res": "",
|
"res/a.res": "",
|
||||||
"res1/b.res": "",
|
"res1/b.res": "",
|
||||||
|
"res2/b.java": "",
|
||||||
},
|
},
|
||||||
Blueprint: `java_library {
|
Blueprint: `java_library {
|
||||||
name: "java-lib-1",
|
name: "java-lib-1",
|
||||||
java_resource_dirs: ["res", "res1"],
|
java_resource_dirs: ["res", "res1", "res2"],
|
||||||
sdk_version: "current",
|
sdk_version: "current",
|
||||||
}`,
|
}`,
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
|
@ -1046,3 +1047,14 @@ filegroup {
|
||||||
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
|
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestJavaSdkVersionCorePlatformDoesNotConvert(t *testing.T) {
|
||||||
|
runJavaLibraryTestCase(t, Bp2buildTestCase{
|
||||||
|
Blueprint: `java_library {
|
||||||
|
name: "java-lib-1",
|
||||||
|
sdk_version: "core_platform",
|
||||||
|
bazel_module: { bp2build_available: true },
|
||||||
|
}`,
|
||||||
|
ExpectedBazelTargets: []string{},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -2826,7 +2826,7 @@ func (m *Library) convertJavaResourcesAttributes(ctx android.TopDownMutatorConte
|
||||||
if resourceStripPrefix == nil && i == 0 {
|
if resourceStripPrefix == nil && i == 0 {
|
||||||
resourceStripPrefix = resAttr.Resource_strip_prefix
|
resourceStripPrefix = resAttr.Resource_strip_prefix
|
||||||
resources = resAttr.Resources.Value
|
resources = resAttr.Resources.Value
|
||||||
} else {
|
} else if !resAttr.Resources.IsEmpty() {
|
||||||
ctx.CreateBazelTargetModule(
|
ctx.CreateBazelTargetModule(
|
||||||
bazel.BazelTargetModuleProperties{
|
bazel.BazelTargetModuleProperties{
|
||||||
Rule_class: "java_resources",
|
Rule_class: "java_resources",
|
||||||
|
@ -2904,8 +2904,13 @@ func (m *Library) convertLibraryAttrsBp2Build(ctx android.TopDownMutatorContext)
|
||||||
var staticDeps bazel.LabelListAttribute
|
var staticDeps bazel.LabelListAttribute
|
||||||
|
|
||||||
if proptools.String(m.deviceProperties.Sdk_version) == "" && m.DeviceSupported() {
|
if proptools.String(m.deviceProperties.Sdk_version) == "" && m.DeviceSupported() {
|
||||||
|
// TODO(b/297356704): handle platform apis in bp2build
|
||||||
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version unset")
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version unset")
|
||||||
return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
|
return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
|
||||||
|
} else if proptools.String(m.deviceProperties.Sdk_version) == "core_platform" {
|
||||||
|
// TODO(b/297356582): handle core_platform in bp2build
|
||||||
|
ctx.MarkBp2buildUnconvertible(bp2build_metrics_proto.UnconvertedReasonType_PROPERTY_UNSUPPORTED, "sdk_version core_platform")
|
||||||
|
return &javaCommonAttributes{}, &bp2BuildJavaInfo{}, false
|
||||||
}
|
}
|
||||||
|
|
||||||
archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{})
|
archVariantProps := m.GetArchVariantProperties(ctx, &CommonProperties{})
|
||||||
|
|
Loading…
Reference in a new issue