3c0a83d19f
Using generics for the providers API allows a type to be associated with a ProviderKey, resulting in a type-safe API without that doesn't require runtime type assertions by every caller. Unfortunately, Go does not allow generic types in methods, only in functions [1]. This prevents a type-safe API on ModuleContext, and requires moving the API to be functions that take a ModuleContext as a parameter. This CL creates the new API, but doesn't convert all of the callers. [1] https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#no-parameterized-methods) Bug: 316410648 Test: builds Change-Id: I3e30d68b966b730efd968166a38a25cc144bd6de
138 lines
3.4 KiB
Text
138 lines
3.4 KiB
Text
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
bootstrap_go_package {
|
|
name: "soong-android",
|
|
pkgPath: "android/soong/android",
|
|
deps: [
|
|
"blueprint",
|
|
"blueprint-bootstrap",
|
|
"blueprint-metrics",
|
|
"sbox_proto",
|
|
"soong",
|
|
"soong-android-soongconfig",
|
|
"soong-remoteexec",
|
|
"soong-response",
|
|
"soong-shared",
|
|
"soong-starlark",
|
|
"soong-starlark-format",
|
|
"soong-ui-metrics_proto",
|
|
"soong-android-allowlists",
|
|
|
|
"golang-protobuf-proto",
|
|
"golang-protobuf-encoding-prototext",
|
|
|
|
// Only used for tests.
|
|
"androidmk-parser",
|
|
],
|
|
srcs: [
|
|
"androidmk.go",
|
|
"apex.go",
|
|
"apex_contributions.go",
|
|
"api_domain.go",
|
|
"api_levels.go",
|
|
"arch.go",
|
|
"arch_list.go",
|
|
"base_module_context.go",
|
|
"buildinfo_prop.go",
|
|
"config.go",
|
|
"test_config.go",
|
|
"config_bp2build.go",
|
|
"configured_jars.go",
|
|
"csuite_config.go",
|
|
"deapexer.go",
|
|
"defaults.go",
|
|
"defs.go",
|
|
"depset_generic.go",
|
|
"deptag.go",
|
|
"early_module_context.go",
|
|
"expand.go",
|
|
"filegroup.go",
|
|
"fixture.go",
|
|
"gen_notice.go",
|
|
"hooks.go",
|
|
"image.go",
|
|
"license.go",
|
|
"license_kind.go",
|
|
"license_metadata.go",
|
|
"license_sdk_member.go",
|
|
"licenses.go",
|
|
"makevars.go",
|
|
"metrics.go",
|
|
"module.go",
|
|
"module_context.go",
|
|
"mutator.go",
|
|
"namespace.go",
|
|
"neverallow.go",
|
|
"ninja_deps.go",
|
|
"notices.go",
|
|
"onceper.go",
|
|
"override_module.go",
|
|
"package.go",
|
|
"package_ctx.go",
|
|
"packaging.go",
|
|
"path_properties.go",
|
|
"paths.go",
|
|
"phony.go",
|
|
"plugin.go",
|
|
"prebuilt.go",
|
|
"prebuilt_build_tool.go",
|
|
"proto.go",
|
|
"provider.go",
|
|
"register.go",
|
|
"rule_builder.go",
|
|
"sandbox.go",
|
|
"sdk.go",
|
|
"sdk_version.go",
|
|
"singleton.go",
|
|
"singleton_module.go",
|
|
"soong_config_modules.go",
|
|
"test_asserts.go",
|
|
"test_suites.go",
|
|
"testing.go",
|
|
"updatable_modules.go",
|
|
"util.go",
|
|
"variable.go",
|
|
"visibility.go",
|
|
],
|
|
testSrcs: [
|
|
"android_test.go",
|
|
"androidmk_test.go",
|
|
"apex_test.go",
|
|
"arch_test.go",
|
|
"config_test.go",
|
|
"config_bp2build_test.go",
|
|
"configured_jars_test.go",
|
|
"csuite_config_test.go",
|
|
"defaults_test.go",
|
|
"depset_test.go",
|
|
"deptag_test.go",
|
|
"expand_test.go",
|
|
"filegroup_test.go",
|
|
"fixture_test.go",
|
|
"gen_notice_test.go",
|
|
"license_kind_test.go",
|
|
"license_test.go",
|
|
"licenses_test.go",
|
|
"module_test.go",
|
|
"mutator_test.go",
|
|
"namespace_test.go",
|
|
"neverallow_test.go",
|
|
"ninja_deps_test.go",
|
|
"onceper_test.go",
|
|
"package_test.go",
|
|
"packaging_test.go",
|
|
"path_properties_test.go",
|
|
"paths_test.go",
|
|
"prebuilt_test.go",
|
|
"rule_builder_test.go",
|
|
"sdk_version_test.go",
|
|
"sdk_test.go",
|
|
"singleton_module_test.go",
|
|
"soong_config_modules_test.go",
|
|
"util_test.go",
|
|
"variable_test.go",
|
|
"visibility_test.go",
|
|
],
|
|
}
|