Add Code Metadata rule to soong/testing.
This Cl adds a new rule to Soong to generate code ownership metadata. Also, this CL adds a provider in the Java SDK library to provide generated source files to the Code_metadata rule. Will add providers to other libraries in the future changes.
Bug: 296873595
Change-Id: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5
diff --git a/android/Android.bp b/android/Android.bp
index 62f534c..f8e3cb3 100644
--- a/android/Android.bp
+++ b/android/Android.bp
@@ -93,6 +93,7 @@
"singleton.go",
"singleton_module.go",
"soong_config_modules.go",
+ "source_file_provider.go",
"test_asserts.go",
"test_suites.go",
"testing.go",
diff --git a/android/source_file_provider.go b/android/source_file_provider.go
new file mode 100644
index 0000000..80bde2a
--- /dev/null
+++ b/android/source_file_provider.go
@@ -0,0 +1,11 @@
+package android
+
+import (
+ "github.com/google/blueprint"
+)
+
+type SrcsFileProviderData struct {
+ SrcPaths Paths
+}
+
+var SrcsFileProviderKey = blueprint.NewProvider(SrcsFileProviderData{})