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/java/test_spec_test.go b/java/test_spec_test.go
index 39aff4c..7f06785 100644
--- a/java/test_spec_test.go
+++ b/java/test_spec_test.go
@@ -27,7 +27,7 @@
 	java_test {
 		name: "java-test-module-name-two",
 	}`
-	result := runTest(t, android.FixtureExpectsNoErrors, bp)
+	result := runTestSpecTest(t, android.FixtureExpectsNoErrors, bp)
 
 	module := result.ModuleForTests(
 		"module-name", "",
@@ -78,7 +78,7 @@
 
 	if metadata != expectedMetadata {
 		t.Errorf(
-			"Retrieved metadata: %s is not equal to expectedMetadata: %s", metadata,
+			"Retrieved metadata: %s doesn't contain expectedMetadata: %s", metadata,
 			expectedMetadata,
 		)
 	}
@@ -121,11 +121,11 @@
 	}
 }
 
-func runTest(
-	t *testing.T, errorHandler android.FixtureErrorHandler, bp string,
+func runTestSpecTest(
+		t *testing.T, errorHandler android.FixtureErrorHandler, bp string,
 ) *android.TestResult {
 	return android.GroupFixturePreparers(
-		soongTesting.PrepareForTestWithTestSpecBuildComponents,
+		soongTesting.PrepareForTestWithTestingBuildComponents,
 		PrepareForIntegrationTestWithJava,
 	).
 		ExtendWithErrorHandler(errorHandler).