|
|
Descriptionandroid: Create a GN template for create_dist_jar.py
BUG=648244
Review-Url: https://codereview.chromium.org/2623243002
Cr-Commit-Position: refs/heads/master@{#444054}
Committed: https://chromium.googlesource.com/chromium/src/+/77ad9ee9d1c3ca1ef984900a31cb206bf885b936
Patch Set 1 #
Total comments: 1
Patch Set 2 : Add direct_deps_only option #Patch Set 3 : interface jars condition was inverted #
Messages
Total messages: 18 (9 generated)
mbonadei@chromium.org changed reviewers: + mbonadei@chromium.org
I tried this and it works fine. In this CL I tried to add public_deps to android_library: https://codereview.chromium.org/2627223003 (assuming that this CL will land). https://codereview.chromium.org/2623243002/diff/1/build/android/gyp/write_bui... File build/android/gyp/write_build_config.py (left): https://codereview.chromium.org/2623243002/diff/1/build/android/gyp/write_bui... build/android/gyp/write_build_config.py:635: dependency_jars = [c['jar_path'] for c in all_library_deps] For the "android_library" use case I think that we should just include direct_library_deps instead of all_library_deps. If we go with all_library_deps we end up with a huge jar wit lots of stuff not directly related. Do you agree?
On 2017/01/12 16:04:32, mbonadei1 wrote: > I tried this and it works fine. > > In this CL I tried to add public_deps to android_library: > https://codereview.chromium.org/2627223003 (assuming that this CL will land). > > https://codereview.chromium.org/2623243002/diff/1/build/android/gyp/write_bui... > File build/android/gyp/write_build_config.py (left): > > https://codereview.chromium.org/2623243002/diff/1/build/android/gyp/write_bui... > build/android/gyp/write_build_config.py:635: dependency_jars = [c['jar_path'] > for c in all_library_deps] > For the "android_library" use case I think that we should just include > direct_library_deps instead of all_library_deps. > If we go with all_library_deps we end up with a huge jar wit lots of stuff not > directly related. Do you agree? Updated with direct_deps_only option. PTAL.
The CQ bit was checked by agrieve@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
I tried the updated CL: https://codereview.webrtc.org/2637723003/ This creates a libjingle_peerconnection_java jar with ThreadUtils and all the classes in 'webrtc/base:base_java'. But I have three concerns: 1. We lose files creation date (it defaults to 2001/01/01 00:00:00) 2. Files dimensions are different 3. The dist_jar has less files than the android_library (look at org/webrtc/RendererCommon$1.class which is not present in dist_jar) Old target: $ jar tvf out/android/lib.java/webrtc/sdk/android/libjingle_peerconnection_java.jar | grep RendererCommon 830 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$1.class 1994 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$VideoLayoutMeasure.class 1659 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$YuvUploader.class 311 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$GlDrawer.class 1199 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$ScalingType.class 3326 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon.class 295 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$RendererEvents.class New target (dist_jar): $ jar tvf out/android/obj/webrtc/sdk/android/libjingle_peerconnection_java.jar | grep RendererCommon 480 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$VideoLayoutMeasure.class 246 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$YuvUploader.class 268 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$GlDrawer.class 514 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$ScalingType.class 764 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon.class 252 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$RendererEvents.class
On 2017/01/16 09:07:40, mbonadei1 wrote: > I tried the updated CL: https://codereview.webrtc.org/2637723003/ > > This creates a libjingle_peerconnection_java jar with ThreadUtils and all the > classes in 'webrtc/base:base_java'. > > But I have three concerns: > 1. We lose files creation date (it defaults to 2001/01/01 00:00:00) > 2. Files dimensions are different > 3. The dist_jar has less files than the android_library (look at > org/webrtc/RendererCommon$1.class which is not present in dist_jar) > > Old target: > $ jar tvf > out/android/lib.java/webrtc/sdk/android/libjingle_peerconnection_java.jar | grep > RendererCommon > 830 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$1.class > 1994 Mon Jan 16 09:39:56 CET 2017 > org/webrtc/RendererCommon$VideoLayoutMeasure.class > 1659 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$YuvUploader.class > 311 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$GlDrawer.class > 1199 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$ScalingType.class > 3326 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon.class > 295 Mon Jan 16 09:39:56 CET 2017 > org/webrtc/RendererCommon$RendererEvents.class > > New target (dist_jar): > $ jar tvf out/android/obj/webrtc/sdk/android/libjingle_peerconnection_java.jar | > grep RendererCommon > 480 Mon Jan 01 00:00:00 CET 2001 > org/webrtc/RendererCommon$VideoLayoutMeasure.class > 246 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$YuvUploader.class > 268 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$GlDrawer.class > 514 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$ScalingType.class > 764 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon.class > 252 Mon Jan 01 00:00:00 CET 2001 > org/webrtc/RendererCommon$RendererEvents.class Doh! One of the ifs was backwards and it was using .interface.jars. The sizes & missing files should be fixed now. As for timestamps, we always intentionally null them out in order to achieve hermetic builds (building the same thing on two different machines should produce the same byte-for-byte artifact). git doesn't maintain mtimes, so I doubt you'd want to?
On 2017/01/16 18:00:48, agrieve wrote: > On 2017/01/16 09:07:40, mbonadei1 wrote: > > I tried the updated CL: https://codereview.webrtc.org/2637723003/ > > > > This creates a libjingle_peerconnection_java jar with ThreadUtils and all the > > classes in 'webrtc/base:base_java'. > > > > But I have three concerns: > > 1. We lose files creation date (it defaults to 2001/01/01 00:00:00) > > 2. Files dimensions are different > > 3. The dist_jar has less files than the android_library (look at > > org/webrtc/RendererCommon$1.class which is not present in dist_jar) > > > > Old target: > > $ jar tvf > > out/android/lib.java/webrtc/sdk/android/libjingle_peerconnection_java.jar | > grep > > RendererCommon > > 830 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$1.class > > 1994 Mon Jan 16 09:39:56 CET 2017 > > org/webrtc/RendererCommon$VideoLayoutMeasure.class > > 1659 Mon Jan 16 09:39:56 CET 2017 > org/webrtc/RendererCommon$YuvUploader.class > > 311 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon$GlDrawer.class > > 1199 Mon Jan 16 09:39:56 CET 2017 > org/webrtc/RendererCommon$ScalingType.class > > 3326 Mon Jan 16 09:39:56 CET 2017 org/webrtc/RendererCommon.class > > 295 Mon Jan 16 09:39:56 CET 2017 > > org/webrtc/RendererCommon$RendererEvents.class > > > > New target (dist_jar): > > $ jar tvf out/android/obj/webrtc/sdk/android/libjingle_peerconnection_java.jar > | > > grep RendererCommon > > 480 Mon Jan 01 00:00:00 CET 2001 > > org/webrtc/RendererCommon$VideoLayoutMeasure.class > > 246 Mon Jan 01 00:00:00 CET 2001 > org/webrtc/RendererCommon$YuvUploader.class > > 268 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$GlDrawer.class > > 514 Mon Jan 01 00:00:00 CET 2001 > org/webrtc/RendererCommon$ScalingType.class > > 764 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon.class > > 252 Mon Jan 01 00:00:00 CET 2001 > > org/webrtc/RendererCommon$RendererEvents.class > > Doh! One of the ifs was backwards and it was using .interface.jars. The sizes & > missing files should be fixed now. > > As for timestamps, we always intentionally null them out in order to achieve > hermetic builds (building the same thing on two different machines should > produce the same byte-for-byte artifact). git doesn't maintain mtimes, so I > doubt you'd want to? Yeah, the sizes and the missing files reported in the previous comment are now fixed: Old target: $ jar tvf ./out/android/lib.java/webrtc/sdk/android/libjingle_peerconnection_java.jar | grep RendererComm 830 Tue Jan 17 08:45:58 CET 2017 org/webrtc/RendererCommon$1.class 1994 Tue Jan 17 08:45:58 CET 2017 org/webrtc/RendererCommon$VideoLayoutMeasure.class 1659 Tue Jan 17 08:45:58 CET 2017 org/webrtc/RendererCommon$YuvUploader.class 311 Tue Jan 17 08:45:58 CET 2017 org/webrtc/RendererCommon$GlDrawer.class 1199 Tue Jan 17 08:46:00 CET 2017 org/webrtc/RendererCommon$ScalingType.class 3326 Tue Jan 17 08:46:00 CET 2017 org/webrtc/RendererCommon.class 295 Tue Jan 17 08:46:00 CET 2017 org/webrtc/RendererCommon$RendererEvents.class New target: $ jar tvf ./out/android/obj/webrtc/sdk/android/libjingle_peerconnection_java.jar | grep RendererCommon 830 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$1.class 1994 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$VideoLayoutMeasure.class 1659 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$YuvUploader.class 311 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$GlDrawer.class 1199 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$ScalingType.class 3326 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon.class 295 Mon Jan 01 00:00:00 CET 2001 org/webrtc/RendererCommon$RendererEvents.class Ok, I agree on the timestamps. It makes lots of sense. lgtm for me.
sakal@chromium.org changed reviewers: + sakal@chromium.org
I tested this CL and it seems to work. lgtm
On 2017/01/17 10:35:41, sakal-chromium wrote: > I tested this CL and it seems to work. lgtm Great! Thanks for your patience on this.
The CQ bit was checked by agrieve@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484663605894930, "parent_rev": "899e87225508ac196d057b8cff1d9ff06d33d1bc", "commit_rev": "77ad9ee9d1c3ca1ef984900a31cb206bf885b936"}
Message was sent while issue was closed.
Description was changed from ========== android: Create a GN template for create_dist_jar.py BUG=648244 ========== to ========== android: Create a GN template for create_dist_jar.py BUG=648244 Review-Url: https://codereview.chromium.org/2623243002 Cr-Commit-Position: refs/heads/master@{#444054} Committed: https://chromium.googlesource.com/chromium/src/+/77ad9ee9d1c3ca1ef984900a31cb... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/77ad9ee9d1c3ca1ef984900a31cb... |