diff options
Diffstat (limited to 'java')
-rw-r--r-- | java/rro.go | 17 | ||||
-rw-r--r-- | java/rro_test.go | 18 |
2 files changed, 21 insertions, 14 deletions
diff --git a/java/rro.go b/java/rro.go index 42d42b86a..4ae8d7fc7 100644 --- a/java/rro.go +++ b/java/rro.go @@ -99,15 +99,6 @@ type RuntimeResourceOverlayProperties struct { Overrides []string } -// RuntimeResourceOverlayModule interface is used by the apex package to gather information from -// a RuntimeResourceOverlay module. -type RuntimeResourceOverlayModule interface { - android.Module - OutputFile() android.Path - Certificate() Certificate - Theme() string -} - // RRO's partition logic is different from the partition logic of other modules defined in soong/android/paths.go // The default partition for RRO is "/product" and not "/system" func rroPartition(ctx android.ModuleContext) string { @@ -217,11 +208,13 @@ func (r *RuntimeResourceOverlay) GenerateAndroidBuildActions(ctx android.ModuleC }) android.SetProvider(ctx, RuntimeResourceOverlayInfoProvider, RuntimeResourceOverlayInfo{ - OutputFile: r.OutputFile(), + OutputFile: r.outputFile, Certificate: r.Certificate(), Theme: r.Theme(), }) + ctx.SetOutputFiles([]android.Path{r.outputFile}, "") + buildComplianceMetadata(ctx) } @@ -252,10 +245,6 @@ func (r *RuntimeResourceOverlay) Certificate() Certificate { return r.certificate } -func (r *RuntimeResourceOverlay) OutputFile() android.Path { - return r.outputFile -} - func (r *RuntimeResourceOverlay) Theme() string { return String(r.properties.Theme) } diff --git a/java/rro_test.go b/java/rro_test.go index 0ccc8e707..3e4fed51e 100644 --- a/java/rro_test.go +++ b/java/rro_test.go @@ -358,3 +358,21 @@ func TestRuntimeResourceOverlayFlagsPackages(t *testing.T) { "--feature-flags @out/soong/.intermediates/bar/intermediate.txt --feature-flags @out/soong/.intermediates/baz/intermediate.txt", ) } + +func TestCanBeDataOfTest(t *testing.T) { + android.GroupFixturePreparers( + prepareForJavaTest, + ).RunTestWithBp(t, ` + runtime_resource_overlay { + name: "foo", + sdk_version: "current", + } + android_test { + name: "bar", + data: [ + ":foo", + ], + } + `) + // Just test that this doesn't get errors +} |