summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-02-14 19:39:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-02-14 19:39:49 +0000
commitfead5397a36fc300cad574aa544022cbfed8f20b (patch)
tree17900a59a12f9f01d000a85e33b00be3ec064843
parent64055a915e39610692f92e575e6a63759c482d60 (diff)
parentd4e053eee285540bdda94f2339ecf534425c2070 (diff)
downloadplatform_testing-fead5397a36fc300cad574aa544022cbfed8f20b.tar.gz
Merge "Remove timestamps from statsd-config-protos.jar" into main
-rw-r--r--libraries/device-collectors/src/main/platform-collectors/Android.bp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libraries/device-collectors/src/main/platform-collectors/Android.bp b/libraries/device-collectors/src/main/platform-collectors/Android.bp
index 25e82bc16..690855104 100644
--- a/libraries/device-collectors/src/main/platform-collectors/Android.bp
+++ b/libraries/device-collectors/src/main/platform-collectors/Android.bp
@@ -12,11 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Genrule for handwritten statsd configs.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
+// Genrule for handwritten statsd configs.
java_genrule {
name: "statsd-config-protos",
host_supported: true,
@@ -24,6 +24,7 @@ java_genrule {
"res/statsd-configs/**/*.pb",
],
out: ["statsd-config-protos.jar"],
+ tools: ["soong_zip"],
/*
* Loops over all subdirectories under res/statsd-configs/ and copy all *.pb configs within to
* an assets/statsd-configs/ directory, which gets packed into a .jar file and ends up under the
@@ -32,10 +33,9 @@ java_genrule {
*
* If a config fails to parse, an error is thrown and the build will fail.
*/
- cmd: "out_dir=$$(dirname $(out)) && assets_dir=\"assets/statsd-configs\" " +
- "&& mkdir -p $$out_dir/$$assets_dir && protos=($(locations res/statsd-configs/**/*.pb)) " +
- "&& for file in $${protos[@]} ; do cp $$file $$out_dir/$$assets_dir/ ; done " +
- "&& jar cf $(out) -C $$(dirname $(out)) $$assets_dir"
+ cmd: "mkdir $(genDir)/pb && protos=($(locations res/statsd-configs/**/*.pb)) " +
+ "&& for file in $${protos[@]} ; do cp $$file $(genDir)/pb/ ; done " +
+ "&& $(location soong_zip) -jar -o $(out) -C $(genDir)/pb -P assets/statsd-configs -D $(genDir)/pb",
}
// This library enables additional listeners dependent on platform apis.