platform_build_soong/java/Android.bp
Paul Duffin 9a89a2a0ea Move boot jars package check from make
Adds a singleton that traverses the module variants finding the ones
that are in the list (updatable and non-updatable) of boot jars and
add a ninja rule to ensure that they only contain packages from an
allowed list.

Replaces a hack that ignored any prebuilt boot jars supplied as dex
file with an equivalent one to ensure that they are still ignored.
A follow up change that switches to checking dex jars will allow the
hack to be removed.

The boot jars check can be strict or lax. If strict then all the boot
jars listed in the configuration must be found, otherwise it will only
check the ones it finds. It is strict by default unless
TARGET_BUILD_UNBUNDLED=true or ALLOW_MISSING_DEPENDENCIES=true.

Moves the script and data file from build/make.

Test: m check-boot-jars - for failing and passing cases
      SKIP_BOOT_JARS_CHECK=true - no check-boot-jars target created
	  ALLOW_MISSING_DEPENDENCIES=true - not strict
	  TARGET_BUILD_UNBUNDLED=true - not strict
      verified manually that apart from path differences the same
      files (same check sum) were checked in both old make checks and
      the new Soong ones
      EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true m check-boot-jars
Bug: 171479578
Change-Id: I9d81d6650ba64fc0d48d2dab4ba5a3ba8dd03dec
2020-10-29 17:20:06 +00:00

71 lines
1.7 KiB
Text

bootstrap_go_package {
name: "soong-java",
pkgPath: "android/soong/java",
deps: [
"blueprint",
"blueprint-pathtools",
"soong",
"soong-android",
"soong-cc",
"soong-dexpreopt",
"soong-genrule",
"soong-java-config",
"soong-python",
"soong-remoteexec",
"soong-tradefed",
],
srcs: [
"aapt2.go",
"aar.go",
"android_manifest.go",
"android_resources.go",
"androidmk.go",
"app_builder.go",
"app.go",
"boot_jars.go",
"builder.go",
"device_host_converter.go",
"dex.go",
"dexpreopt.go",
"dexpreopt_bootjars.go",
"dexpreopt_config.go",
"droiddoc.go",
"gen.go",
"genrule.go",
"hiddenapi.go",
"hiddenapi_singleton.go",
"jacoco.go",
"java.go",
"jdeps.go",
"java_resources.go",
"kotlin.go",
"lint.go",
"legacy_core_platform_api_usage.go",
"platform_compat_config.go",
"plugin.go",
"prebuilt_apis.go",
"proto.go",
"robolectric.go",
"sdk.go",
"sdk_library.go",
"support_libraries.go",
"sysprop.go",
"system_modules.go",
"testing.go",
"tradefed.go",
],
testSrcs: [
"androidmk_test.go",
"app_test.go",
"device_host_converter_test.go",
"dexpreopt_test.go",
"dexpreopt_bootjars_test.go",
"hiddenapi_singleton_test.go",
"java_test.go",
"jdeps_test.go",
"kotlin_test.go",
"plugin_test.go",
"sdk_test.go",
],
pluginFor: ["soong_build"],
}