diff options
author | 2024-10-22 20:40:25 +0000 | |
---|---|---|
committer | 2024-10-22 20:40:25 +0000 | |
commit | a9e9f539e8f07e92e737fd9516a8e8e2da4aa8a4 (patch) | |
tree | 280cf3f5f7e3c1fa0e984a2d4565eeeb39dce7c4 /java/base.go | |
parent | 25ebc502672abbbe2df0b6efbbc42b5d3983cc69 (diff) | |
parent | 65cb40a975fb53187cfc5d9edea905b1f7630ab2 (diff) |
Merge "Add new properties to aid in removing the 1-variant fallback" into main
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/base.go b/java/base.go index f075dbd21..3927c6194 100644 --- a/java/base.go +++ b/java/base.go @@ -71,6 +71,15 @@ type CommonProperties struct { // list of files that should be excluded from java_resources and java_resource_dirs Exclude_java_resources []string `android:"path,arch_variant"` + // Same as java_resources, but modules added here will use the device variant. Can be useful + // for making a host test that tests the contents of a device built app. + Device_common_java_resources []string `android:"path_device_common"` + + // Same as java_resources, but modules added here will use the device's os variant and the + // device's first architecture variant. Can be useful for making a host test that tests the + // contents of a native device built app. + Device_first_java_resources []string `android:"path_device_first"` + // list of module-specific flags that will be used for javac compiles Javacflags []string `android:"arch_variant"` @@ -1486,6 +1495,10 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath dirArgs, dirDeps := ResourceDirsToJarArgs(ctx, j.properties.Java_resource_dirs, j.properties.Exclude_java_resource_dirs, j.properties.Exclude_java_resources) fileArgs, fileDeps := ResourceFilesToJarArgs(ctx, j.properties.Java_resources, j.properties.Exclude_java_resources) + fileArgs2, fileDeps2 := ResourceFilesToJarArgs(ctx, j.properties.Device_common_java_resources, nil) + fileArgs3, fileDeps3 := ResourceFilesToJarArgs(ctx, j.properties.Device_first_java_resources, nil) + fileArgs = slices.Concat(fileArgs, fileArgs2, fileArgs3) + fileDeps = slices.Concat(fileDeps, fileDeps2, fileDeps3) extraArgs, extraDeps := resourcePathsToJarArgs(j.extraResources), j.extraResources var resArgs []string |