diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-02-14 20:12:22 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-14 20:12:22 +0000 |
commit | 4cfbdd7a7a08965d092f5bcabfd05eeda78d5c07 (patch) | |
tree | 9410cb1dcd98dd3ca18fb6614dcf7a64c1a15eba | |
parent | 653ac29aa955e321086e365544c939f00538bfd6 (diff) | |
parent | fead5397a36fc300cad574aa544022cbfed8f20b (diff) | |
download | platform_testing-4cfbdd7a7a08965d092f5bcabfd05eeda78d5c07.tar.gz |
Merge "Remove timestamps from statsd-config-protos.jar" into main am: fead5397a3
Original change: https://android-review.googlesource.com/c/platform/platform_testing/+/2963542
Change-Id: I792458622d0770b111c74fc82c6e0ec2f95af3ae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libraries/device-collectors/src/main/platform-collectors/Android.bp | 10 |
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. |