Support Java try-with-resources with Desugar |
|||
Issue descriptionCurrently Desugar cannot support try-with-resources without additional support classes. If we allow Desugar to liberally add those classes, the build fails at Proguard due to multiple same classes. To support try-with-resources, we need to tell Desugar to not add the support classes and add the support classes to the final target ourselves. Unfortunately that would render all intermediate libraries unusable, and might break non-Chrome targets. As a result, we do not intend to add such support in the near future.
,
Aug 8 2017
Also we need to update lint to not fail on try-with-resources with NewAPI error
,
Aug 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c20eeee528d703316ee8e88c790c4ab6ff04f0ae commit c20eeee528d703316ee8e88c790c4ab6ff04f0ae Author: Andrew Grieve <agrieve@chromium.org> Date: Fri Aug 11 16:00:44 2017 Android: Add support for Java's try-with-resources via Desugar. Bug: 751776 Change-Id: Ibb33dc5dae89d3f0eb9b44145c0aabbae2e3c21f Reviewed-on: https://chromium-review.googlesource.com/610980 Reviewed-by: Biao She <bshe@chromium.org> Reviewed-by: Felix <zpeng@chromium.org> Commit-Queue: Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#493759} [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/base/android/java/src/org/chromium/base/ContentUriUtils.java [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/base/android/java/src/org/chromium/base/SecureRandomInitializer.java [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/build/android/BUILD.gn [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/build/android/gyp/desugar.py [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/build/android/lint/suppressions.xml [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/third_party/.gitignore [add] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/third_party/bazel/desugar/BUILD.gn [add] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/third_party/bazel/desugar/Desugar-runtime.jar [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/third_party/bazel/desugar/README.chromium [modify] https://crrev.com/c20eeee528d703316ee8e88c790c4ab6ff04f0ae/third_party/gvr-android-sdk/BUILD.gn
,
Aug 16 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by zpeng@chromium.org
, Aug 2 2017