Allow module types to generate resources

Robolectric will need to generate extra resources to be added to
the jar.

Test: TestResources
Change-Id: I028f91ea8fc5d1e59e4e805876d70f57d8899f11
This commit is contained in:
Colin Cross
2019-05-06 14:04:11 -07:00
parent e0dbdd87f0
commit 988708ce75
2 changed files with 16 additions and 1 deletions

View File

@@ -98,6 +98,14 @@ func resourceFilesToJarArgs(ctx android.ModuleContext,
files := android.PathsForModuleSrcExcludes(ctx, res, exclude)
args = resourcePathsToJarArgs(files)
return args, files
}
func resourcePathsToJarArgs(files android.Paths) []string {
var args []string
lastDir := ""
for i, f := range files {
rel := f.Rel()
@@ -113,5 +121,5 @@ func resourceFilesToJarArgs(ctx android.ModuleContext,
lastDir = dir
}
return args, files
return args
}