[Cronet] Make cronet_sample_apk depend on cronet package jars
Original motivation for this change was to make our dex-count monitoring perf tests get a more accurate result that is like what Cronet users will see. For example prior to this change crrev.com/542392 showed no improvements, but with this change the improvement should be visible. As I implemented this change it made other benefits visible: Our cronet_impl_native_proguard.cfg file wasn't properly updated for crrev.com/542392, indicating a gap in our testing...we didn't have any tests for the final products we were putting in the cronet/ output dir. The main change in this test is to make the Cronet sample app depend on the jars in the cronet/ output directory rather than the intermediate jars. This required some related changes: 1. The Cronet sample app could no longer be used to generate Cronet's JNI registration as the JNI registration generation searches for Java source files to parse and they were no longer visible as the sample app now depends on some copied jars, not android_libraries. This was fixed by adding a simple app providing the visible Java files. 2. The Cronet sample test is an instrumentation test which means it's built combined with the Cronet sample. Previously the Cronet sample app had visible dependencies on //base and //net Java targets, but these are now built into the jars in the cronet/ output dir. This means that sample test build would include them again resulting in proguard duplicate errors. To avoid this I removed test deps on //base and //net. 3. In a number of ways this change ran afoul of the target name whitelist in build/config/android/internal_rules.gni that determines which targets must have build_configs generated. I had to be careful in how I named my targets and in the case of copy_java8_jars explicitly generate a build_config. Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester Change-Id: I3706a768b0c2fc7261660dc0db4826b17dc81a61 Reviewed-on: https://chromium-review.googlesource.com/960583 Commit-Queue: Paul Jensen <pauljensen@chromium.org> Reviewed-by:Helen Li <xunjieli@chromium.org> Cr-Commit-Position: refs/heads/master@{#544089}
Showing
Please register or sign in to comment