platform_build_soong/bp2build/Android.bp
Jingwen Chen 164e0867fc bp2build: add a simple UI to report migration progress.
Sample output:

[bp2build] cc_library_headers: 5 targets
[bp2build] cc_object: 5 targets
[bp2build] filegroup: 4 targets
[bp2build] genrule: 4 targets
[bp2build] sh_binary: 1 targets
[bp2build] Generated 19 total BUILD targets from 39270 Android.bp modules.

This CL adds an additional CodegenMetrics return value to
GenerateBazelTargets calls, which are called from bp2build, queryview,
and their tests. For this UI, we only want to use it for bp2build, and
not queryview or tests, since it's not useful for the former, and can
pollute the CLI for the latter.

Test: build/bazel/scripts/milestone-2/demo.sh
Change-Id: Ic84307a1ed1a25e360c9b23459e5449d932bc2e7
2021-02-19 09:30:11 -05:00

35 lines
800 B
Text

package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
bootstrap_go_package {
name: "soong-bp2build",
pkgPath: "android/soong/bp2build",
srcs: [
"androidbp_to_build_templates.go",
"bp2build.go",
"build_conversion.go",
"bzl_conversion.go",
"conversion.go",
"metrics.go",
],
deps: [
"soong-android",
"soong-bazel",
"soong-cc",
"soong-genrule",
"soong-sh",
],
testSrcs: [
"build_conversion_test.go",
"bzl_conversion_test.go",
"cc_library_headers_conversion_test.go",
"cc_object_conversion_test.go",
"conversion_test.go",
"sh_conversion_test.go",
"testing.go",
],
pluginFor: [
"soong_build",
],
}