New issue
Advanced search Search tips

Issue 640836 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 624324



Sign in to add a comment

Add proguard.flags support to our aar_prebuilt() rule

Project Member Reported by agrieve@chromium.org, Aug 25 2016

Issue description

We'll need this for play services, which distributes proguard flags in their .aar files.

Note that we'll also need to remove the play-services-specific proguard flags (e.g. the one added here: https://codereview.chromium.org/2269143005)
 
Is it okay to up the priority here? The following proguard rule is currently blocking Cronet from using base proguard flags (internal cl/130441574). 

# Keep all Parcelables, since Play Services has some that are used only by
# reflection.
# TODO(agrieve): Remove this once proguard flags provided by play services via
#     .aars are used.   https://crbug.com/640836 
-keep class * implements android.os.Parcelable
I should be able to get to it this week.
Another user of this feature:
chrome/android/chrome_public_apk_tmpl.gni pulls in "//third_party/gvr-android-sdk/proguard/base.flags" ]
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 1 2016

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aeb5a420fe3017cf81b0fb23770edf51238623c5

commit aeb5a420fe3017cf81b0fb23770edf51238623c5
Author: agrieve <agrieve@chromium.org>
Date: Thu Sep 01 15:44:21 2016

Allow android_* targets to specify proguard flags for apks

There are two current places where this comes up: play services and gvr.
Both have been updated in this change to use the new variable.

Follow-up change will be made to remove the play-services-specific -keep
from base/android/base_proguard_config.flags.new once downstream has
updated to use this new flag as well.

This does not yet support detecting proguard.flags file within an .aar.
That will come later as well.

TBR=bshe
BUG= 640836 

Review-Url: https://codereview.chromium.org/2295363002
Cr-Commit-Position: refs/heads/master@{#415962}

[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/android/gyp/proguard.py
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/android/gyp/write_build_config.py
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/config/android/internal_rules.gni
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/config/android/rules.gni
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/secondary/third_party/android_tools/BUILD.gn
[add] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/build/secondary/third_party/android_tools/apk_proguard.flags
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/chrome/android/chrome_public_apk_tmpl.gni
[modify] https://crrev.com/aeb5a420fe3017cf81b0fb23770edf51238623c5/third_party/gvr-android-sdk/BUILD.gn

Blocking: 624324
Add blocking bug, although not *really* blocking (there are other work-arounds)
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/chrome/src-internal.git/+/5c4e9cec3a58b06c45d64d3440c394491d0780ff

commit 5c4e9cec3a58b06c45d64d3440c394491d0780ff
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Sep 02 19:37:25 2016

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/547835e14e0dcc064dc7086d253d656c8b341b58

commit 547835e14e0dcc064dc7086d253d656c8b341b58
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Sep 02 17:49:19 2016

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/547835e14e0dcc064dc7086d253d656c8b341b58

commit 547835e14e0dcc064dc7086d253d656c8b341b58
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Sep 02 17:49:19 2016

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 2 2016

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/547835e14e0dcc064dc7086d253d656c8b341b58

commit 547835e14e0dcc064dc7086d253d656c8b341b58
Author: Andrew Grieve <agrieve@chromium.org>
Date: Fri Sep 02 17:49:19 2016

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c41ec1ae1555bbb04c06f80a5fcbd86978e8735d

commit c41ec1ae1555bbb04c06f80a5fcbd86978e8735d
Author: agrieve <agrieve@chromium.org>
Date: Sat Sep 03 02:38:45 2016

Remove Parcelable -keep from base proguard rules

And tidy up proguard_config -> proguard_preprocess_config rename

Verified locally that ChromePublic.apk had no size change from
this patch.

BUG= 640836 

Review-Url: https://codereview.chromium.org/2310473002
Cr-Commit-Position: refs/heads/master@{#416428}

[modify] https://crrev.com/c41ec1ae1555bbb04c06f80a5fcbd86978e8735d/base/android/base_proguard_config.flags
[modify] https://crrev.com/c41ec1ae1555bbb04c06f80a5fcbd86978e8735d/build/android/gyp/proguard.py
[modify] https://crrev.com/c41ec1ae1555bbb04c06f80a5fcbd86978e8735d/build/config/android/internal_rules.gni

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8dbd4fb5770dc164dfa20845f839d49c154b0e9c

commit 8dbd4fb5770dc164dfa20845f839d49c154b0e9c
Author: agrieve <agrieve@chromium.org>
Date: Thu Sep 08 02:02:49 2016

Make android_aar_prebuilt() aware of remaining features

* Fail if it finds a non-trivial AndroidManifest.xml
* Fail if it finds any .so files
* Fail if it finds any assets
* Support proguard.txt

This also tweaks the naming of the sub-jar targets to give them better
target names (which show up in .jar names).

TBR=bshe
BUG= 640836 

Review-Url: https://codereview.chromium.org/2309643002
Cr-Commit-Position: refs/heads/master@{#417160}

[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/android/gyp/aar.py
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/config/android/rules.gni
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/secondary/third_party/android_tools/BUILD.gn
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/third_party/gvr-android-sdk/BUILD.gn

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 8 2016

Labels: merge-merged-2854
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8dbd4fb5770dc164dfa20845f839d49c154b0e9c

commit 8dbd4fb5770dc164dfa20845f839d49c154b0e9c
Author: agrieve <agrieve@chromium.org>
Date: Thu Sep 08 02:02:49 2016

Make android_aar_prebuilt() aware of remaining features

* Fail if it finds a non-trivial AndroidManifest.xml
* Fail if it finds any .so files
* Fail if it finds any assets
* Support proguard.txt

This also tweaks the naming of the sub-jar targets to give them better
target names (which show up in .jar names).

TBR=bshe
BUG= 640836 

Review-Url: https://codereview.chromium.org/2309643002
Cr-Commit-Position: refs/heads/master@{#417160}

[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/android/gyp/aar.py
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/config/android/rules.gni
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/build/secondary/third_party/android_tools/BUILD.gn
[modify] https://crrev.com/8dbd4fb5770dc164dfa20845f839d49c154b0e9c/third_party/gvr-android-sdk/BUILD.gn

Status: Fixed (was: Available)

Sign in to add a comment