Граф коммитов

59 Коммитов

Автор SHA1 Сообщение Дата
Sami Kalliomäki fbfaa84241 Update generate_gradle.py to support Java 8.
Adds support for Java 8 using Desugar. Android Studio 3.0 is required
for Desugar. enforceUniquePackageName is no longer needed by the new
gradle version. This feature is behind "--canary" flag for now.

Bug: webrtc:8084, chromium:730711
Change-Id: Iba24880fef303aa627307356f2e26b78e153a960
Reviewed-on: https://chromium-review.googlesource.com/609066
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Sami Kalliomäki <sakal@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#493418}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8f75411b306ddbb870d85c39dc03024b7bd5ec74
2017-08-10 16:27:38 +00:00
Ingemar Ådahl 6ada47bc79 Merge Android manifests when assembling apk
Merge all resource dependency manifests using the manifest merger from the
Android SDK, providing the functionality described in
https://developer.android.com/studio/build/manifest-merge.html.

Removing the nontrivial manifest guard in the android_aar_prebuilt() template
will be done in a follow-up change, as well as removing pre-merged manifest
tags, such as "com.google.android.gms.version" meta-data.

Bug: 643967
Change-Id: Ifdf9f3f76f5c80f1a2326dcd47045d032556936f
Reviewed-on: https://chromium-review.googlesource.com/558296
Reviewed-by: Bo Liu <boliu@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Ingemar Ådahl <ingemara@opera.com>
Cr-Original-Commit-Position: refs/heads/master@{#485303}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f3efbd5b8ec69ef49dbdbf8945f546815039efe3
2017-07-10 17:14:01 +00:00
Yipeng Wang 8e30dfaa9d Reland #3: [Android JNI] Generate calls to RegisterNatives()
Reverted in: I31b4c809584f8dbb8e5626a28562d94a422611e7

Reason for reland: CL 556581 has fixed the bug.

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Bug: 683256, 738067
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: Ie1afd9b6e606ebecfdf5ffbd0897fabbdfd3e157
Reviewed-on: https://chromium-review.googlesource.com/558004
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#483760}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac
2017-06-30 18:16:41 +00:00
Yipeng Wang 6a1efaf5fd Revert "Reland #2: [Android JNI] Generate calls to RegisterNatives()"
This reverts commit 00dcdcaefbacf82529f73820318f6ae65c17e253.

Reason for revert: break downstream x64 compile.

Original change's description:
> Reland #2: [Android JNI] Generate calls to RegisterNatives()
> 
> Reverted in: Ibb4a5203f3811cf26fa13d8684a849278b4c316f
> 
> Reason for reland: Excluded VR native side from JNI registration
> when not on arm/arm64.
> 
> Bug: 683256, 738067
> Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
> 
> TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org
> 
> Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
> Reviewed-on: https://chromium-review.googlesource.com/557099
> Commit-Queue: Yipeng Wang <yipengw@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#483692}

TBR=agrieve@chromium.org,estevenson@chromium.org,yipengw@chromium.org

Change-Id: I31b4c809584f8dbb8e5626a28562d94a422611e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 683256, 738067
Reviewed-on: https://chromium-review.googlesource.com/558101
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#483709}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a3119620c4582a27c8d2dade010206ee4fd388a
2017-06-30 15:27:54 +00:00
Yipeng Wang e055b861d1 Reland #2: [Android JNI] Generate calls to RegisterNatives()
Reverted in: Ibb4a5203f3811cf26fa13d8684a849278b4c316f

Reason for reland: Excluded VR native side from JNI registration
when not on arm/arm64.

Bug: 683256, 738067
Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
Reviewed-on: https://chromium-review.googlesource.com/557099
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#483692}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 00dcdcaefbacf82529f73820318f6ae65c17e253
2017-06-30 14:10:39 +00:00
Andrew Grieve e739153a95 Revert "Reland: [Android JNI] Generate calls to RegisterNatives()"
This reverts commit 5510546e55d45b802b20c9b67a7f2de010602e47.

Reason for revert: Breaks compile for non-arm official builds

Original change's description:
> Reland: [Android JNI] Generate calls to RegisterNatives()
> 
> Reverted in: Ibbb98c136baaf016a9b26b3e614ca96e8a408c41
> 
> Reason for reland: Selective JNI registration is fixed by:
> If97814bc5d79cfaa0211e46f785dbab329429d22
> 
> There is no change on this CL since reverted.
> 
> TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org
> 
> Bug: 683256
> Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
> Change-Id: Ibdb983b4ba07cf7e2b23a4c1706213175acfa7bf
> Reviewed-on: https://chromium-review.googlesource.com/553157
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Commit-Queue: Yipeng Wang <yipengw@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#483150}

TBR=agrieve@chromium.org,yipengw@chromium.org

Change-Id: Ibb4a5203f3811cf26fa13d8684a849278b4c316f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 683256
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Reviewed-on: https://chromium-review.googlesource.com/555711
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#483370}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4a0bb5d2a1c1169821bffadd4b89f171285e3b95
2017-06-29 15:34:23 +00:00
Yipeng Wang a856ba17af Reland: [Android JNI] Generate calls to RegisterNatives()
Reverted in: Ibbb98c136baaf016a9b26b3e614ca96e8a408c41

Reason for reland: Selective JNI registration is fixed by:
If97814bc5d79cfaa0211e46f785dbab329429d22

There is no change on this CL since reverted.

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Bug: 683256
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: Ibdb983b4ba07cf7e2b23a4c1706213175acfa7bf
Reviewed-on: https://chromium-review.googlesource.com/553157
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#483150}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5510546e55d45b802b20c9b67a7f2de010602e47
2017-06-28 21:42:10 +00:00
Yipeng Wang 0cc0d7ea8d Revert "Android JNI: Generate calls to RegisterNatives()"
This reverts commit be11db405efa4b6ce9117877a34abf3bfea911ff.

Reason for revert: breaks VR bot: https://build.chromium.org/p/chromium.fyi/builders/Android%20VR%20Tests/builds/8763

Original change's description:
> Android JNI: Generate calls to RegisterNatives()
> 
> Generate registration functions with unique names(package+class). Create a new template to
> generate a header file which calls all registration functions together.
> 
> This CL also switches the test targets from using explicit JNI registration (via RegisterNatives()),
> to using implicit JNI registration (just export the symbols and let dalvik look them up lazily).
> 
> This switch simplifies things a great deal, as the only reason for using explicit registration is
> to work around a deficiency in the crazy linker, which most test targets don't use.
> 
> Design doc: https://docs.google.com/document/d/1pYnceZMuxhpU9u3OAzWLYInV_nqtHKsBFROp927FDXM/edit?usp=sharing
> 
> Bug: 683256
> Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
> Change-Id: I31cbfe393c9088233f65f1249285d48ac5571f45
> Reviewed-on: https://chromium-review.googlesource.com/527683
> Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
> Reviewed-by: Misha Efimov <mef@chromium.org>
> Reviewed-by: Luke Halliwell <halliwell@chromium.org>
> Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> Reviewed-by: Joe Downing <joedow@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: John Budorick <jbudorick@chromium.org>
> Reviewed-by: Richard Coles <torne@chromium.org>
> Commit-Queue: Yipeng Wang <yipengw@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#482615}

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Change-Id: Ibbb98c136baaf016a9b26b3e614ca96e8a408c41
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 683256
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Reviewed-on: https://chromium-review.googlesource.com/550576
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#482656}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 09f1b8ec88d4a63d64948213b4dc0b6179f18bbe
2017-06-27 17:12:37 +00:00
Yipeng Wang 1c753713c7 Android JNI: Generate calls to RegisterNatives()
Generate registration functions with unique names(package+class). Create a new template to
generate a header file which calls all registration functions together.

This CL also switches the test targets from using explicit JNI registration (via RegisterNatives()),
to using implicit JNI registration (just export the symbols and let dalvik look them up lazily).

This switch simplifies things a great deal, as the only reason for using explicit registration is
to work around a deficiency in the crazy linker, which most test targets don't use.

Design doc: https://docs.google.com/document/d/1pYnceZMuxhpU9u3OAzWLYInV_nqtHKsBFROp927FDXM/edit?usp=sharing

Bug: 683256
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: I31cbfe393c9088233f65f1249285d48ac5571f45
Reviewed-on: https://chromium-review.googlesource.com/527683
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Joe Downing <joedow@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#482615}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be11db405efa4b6ce9117877a34abf3bfea911ff
2017-06-27 13:57:02 +00:00
Anthony Berent 01d1307ecc Add Android Webview Embedded Server to gradle
Was missing, hence meaning that its source files were unknown to
Android Studio.

Change-Id: I902cc5b6b1437a03a5fed5198d074e7965494879
Reviewed-on: https://chromium-review.googlesource.com/548598
Reviewed-by: Peter Wen <wnwen@chromium.org>
Commit-Queue: Anthony Berent <aberent@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#482287}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 983cd1cfe6903095f4a0855b18d65ee4ee5db7ac
2017-06-26 16:18:10 +00:00
Peter Wen 69186fb738 Android: Update gradle plugin version
Bug: None
Change-Id: Iee6681c94726531e6bcf54869155f04f59bdd299
Reviewed-on: https://chromium-review.googlesource.com/548855
Reviewed-by: Eric Stevenson <estevenson@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#482275}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2fbcfb5397651fdf4f680cb1e37ca8e38bfd6bd9
2017-06-26 15:00:30 +00:00
wnwen 427c444f50 Android: Update gradle version
BUG=620034

Review-Url: https://codereview.chromium.org/2902043003
Cr-Original-Commit-Position: refs/heads/master@{#474313}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b4b2d1e1fb916471009d5b5393e0851f1a56bab1
2017-05-24 16:09:53 +00:00
wnwen 6d87cae42f Android: Add resources back to Android Studio
Resources were not collected for the pseudo all module before. Adding it
back, but skipping the generated resources folders.

BUG=722302

Review-Url: https://codereview.chromium.org/2888923002
Cr-Original-Commit-Position: refs/heads/master@{#472485}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dc177240b50784d9fe81d654e129275028e6d97f
2017-05-17 17:18:54 +00:00
avayvod 9b4b28cf76 [Android, Tools] Speed up gn_to_cmake.py with caching
BUG=694699
TEST=local run

Review-Url: https://codereview.chromium.org/2866863003
Cr-Original-Commit-Position: refs/heads/master@{#470299}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 23bc56150efb4ae54f6662e8552ac693fb41d485
2017-05-09 13:02:47 +00:00
wnwen 6f77b182f9 Android: Fix generate_gradle.py
Bugs causing split-project and use-gradle-resources to not work
correctly. Also fix the jinja template.

BUG=620034

Review-Url: https://codereview.chromium.org/2858233002
Cr-Original-Commit-Position: refs/heads/master@{#469372}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f011a78f3f93e0f52b89b29a4b40b2e2f879733c
2017-05-04 17:35:36 +00:00
wnwen 24b506bc33 Android: Remove apk modules for Android Studio
It is no longer necessary to list all the apk targets as separate
modules now that we have the _all pseudo module. Having the separate
modules resulted in bugs where Android Studio could not distinguish
between prod code and test code since some modules viewed dirs as prod
and some as test. The --split-projects flag can be used to see the
dependency graph, and when only a single module will be generated, the
_all pseudo module will not replace it.

For android studio's _all pseudo module, move all known test dirs to
androidTest instead of main so that they are properly displayed when
filtered.

BUG=620034

Review-Url: https://codereview.chromium.org/2837863002
Cr-Original-Commit-Position: refs/heads/master@{#467704}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e851ad470036997a9a43b0ee2710442f1b5c2096
2017-04-27 16:21:42 +00:00
ctzsm 45efa92cd4 Rename android_webview_apk and android_webview_test_apk
To webview_instrumentation_apk and webview_instrumentation_test_apk

BUG=701938

Review-Url: https://codereview.chromium.org/2802093008
Cr-Original-Commit-Position: refs/heads/master@{#466368}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 34f54d6d0964d6dcd779482a884819dcf973c05f
2017-04-21 17:04:07 +00:00
wnwen b458249b49 Android: Add module "_all" for Android Studio
Adding all sources to a "_all" pseudo module fixes Studio's code analysis
functions (imports, refactoring).

In order to have things build properly in gradle, the "_all" module has
all sources excluded (gradle applies the filters, studio does not).

Also fix "--all" targets to include tests. Make it easier to make sweeping
java refactors in Android Studio.

BUG=620034

Review-Url: https://codereview.chromium.org/2812133003
Cr-Original-Commit-Position: refs/heads/master@{#465700}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 03427bcc41560b36b5c595eda92e35f563a6303e
2017-04-19 19:22:24 +00:00
sakal 62ec1e1e77 Change dummy package name so it doesn't include a reserved word.
Using dummy.package as a package name causes problems in Android Studio
2.3.

BUG=webrtc:7498, 700438

Review-Url: https://codereview.chromium.org/2827923002
Cr-Original-Commit-Position: refs/heads/master@{#465624}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7acdbdd51897c2abc030f06ecfec9116ea5bee26
2017-04-19 15:55:54 +00:00
wnwen 6268c3a8bd Android: Upgrade to Android Studio 2.3
Support Clank development with the next version of Android Studio.

BUG=700438

Review-Url: https://codereview.chromium.org/2797703004
Cr-Original-Commit-Position: refs/heads/master@{#462050}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fdea62ce258c0abf7327f1081af9d964818c440f
2017-04-05 13:12:54 +00:00
agrieve 30113aa452 generate_gradle.py: Add --extra-target that appends to the default set
I find this is more often what I want (as opposed to replacing the
default list of targets).

BUG=620034

Review-Url: https://codereview.chromium.org/2784293002
Cr-Original-Commit-Position: refs/heads/master@{#460878}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f8d338ac684358b34a2cd77518d434fb6fa433a3
2017-03-30 21:14:36 +00:00
estevenson 4c534d4429 Revert of Android: Support Android Studio 2.3 (patchset #2 id:20001 of https://codereview.chromium.org/2746103004/ )
Reason for revert:
Breaks code editing in Android Studio, see http://crbug/700438 for more info.

Original issue's description:
> Android: Support Android Studio 2.3
>
> Also fixes excludes filters not working. For files whose directory is
> not fully included in the target, add those individually instead.
>
> BUG=700438
>
> Review-Url: https://codereview.chromium.org/2746103004
> Cr-Commit-Position: refs/heads/master@{#457093}
> Committed: f9fca7ca02

TBR=wnwen@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=700438

Review-Url: https://codereview.chromium.org/2758683003
Cr-Original-Commit-Position: refs/heads/master@{#457866}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 136f215ed31f9e748b388b5e79bf0e4888f62acc
2017-03-17 19:59:19 +00:00
wnwen 1a88c1e1db Android: Support Android Studio 2.3
Also fixes excludes filters not working. For files whose directory is
not fully included in the target, add those individually instead.

BUG=700438

Review-Url: https://codereview.chromium.org/2746103004
Cr-Original-Commit-Position: refs/heads/master@{#457093}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f9fca7ca0225a5c4ef021046526bf75e2cade80d
2017-03-15 15:47:29 +00:00
wnwen 509f01322c Android: Add missing resources to android studio
Some apk targets directly depend on their resources (e.g.
//android_webview/test:android_webview_apk). These are not picked up by
javac and need to be added to gradle in order to allow editing of all
resources.

BUG=682846

Review-Url: https://codereview.chromium.org/2724093003
Cr-Original-Commit-Position: refs/heads/master@{#456416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f37993e1a795b3d8d72bb858a8ccb0a74b82400b
2017-03-13 17:36:15 +00:00
sakal aa1278561c Fix .so-file enumeration in generate_gradle.py.
BUG=620034, webrtc:6328
NOTRY=True

Review-Url: https://codereview.chromium.org/2747723002
Cr-Original-Commit-Position: refs/heads/master@{#456373}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a4451c911ee05e56000474c58bfad89f744a35e
2017-03-13 14:26:50 +00:00
ymzhang 8acd528aab [DirectoryOwnership] Add TEAM/COMPONENT into OWNERS files.
We are adding COMPONENT/TEAM information into OWNERS file
(third_party/*, etc).

Proposal to add TEAM/COMPONENT information into OWNERS files
http://bit.ly/add-team-component-proposal
Proposal about how to get suggested component for directory.
http://bit.ly/directory-mapping-proposal
TEAM-COMPONENT mapping
http://bit.ly/component-team-mapping

Additional Information:
Component lists
https://bugs.chromium.org/p/chromium/adminComponents

BUG=679905
R=agrieve@chromium.org

Review-Url: https://codereview.chromium.org/2734393004
Cr-Original-Commit-Position: refs/heads/master@{#455799}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: af8c9798ce11b04fb6ad0fa8ddd5e7f0d7faf8af
2017-03-09 18:29:14 +00:00
wnwen 43783b113c Android: Upstream gn_to_cmake.py
The script was originally //third_party/skia/gn/gn_to_cmake.py

Planning to use it to enable editing native files in android studio.

Currently script does not allow full build, intended for editing only.

BUG=694699

Review-Url: https://codereview.chromium.org/2733353003
Cr-Original-Commit-Position: refs/heads/master@{#455521}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a45e8b336d2b214cfd5db0b3e3b5b85b688ce8db
2017-03-08 20:08:42 +00:00
wnwen 7d97a2e9c1 Android: Add wnwen@ to build/android/gradle/OWNERS
BUG=None

Review-Url: https://codereview.chromium.org/2737973002
Cr-Original-Commit-Position: refs/heads/master@{#455514}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: db995c23f79d3ab26300676f8c431b7e4c115ad4
2017-03-08 19:35:01 +00:00
agrieve 2d722d1684 Reland of Make generate_gradle.py work with preview SDKs
This just tweaks the values of buildToolsVersion and compileSdkVersion,
which were not being set in a way compatible with preview SDKs.

Reverted in:
https://codereview.chromium.org/2722973002/

Reason for reland:
Fixed up non-absolute path.

TBR=estevenson@chromium.org,nyquist@chromium.org
BUG=620034

Review-Url: https://codereview.chromium.org/2727523002
Cr-Original-Commit-Position: refs/heads/master@{#453827}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 46eff9b374a4635979acef9a292682504f25ff2c
2017-03-01 03:37:16 +00:00
agrieve c8bbf01fe4 Revert of Make generate_gradle.py work with preview SDKs. (patchset #1 id:1 of https://codereview.chromium.org/2724513003/ )
Reason for revert:
Breaks when CWD != output_dir

Original issue's description:
> Make generate_gradle.py work with preview SDKs.
>
> This just tweaks the values of buildToolsVersion and compileSdkVersion,
> which were not being set in a way compatible with preview SDKs.
>
> BUG=620034
>
> Review-Url: https://codereview.chromium.org/2724513003
> Cr-Commit-Position: refs/heads/master@{#453737}
> Committed: 1a04e1cf3d

TBR=estevenson@chromium.org,nyquist@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=620034

Review-Url: https://codereview.chromium.org/2722973002
Cr-Original-Commit-Position: refs/heads/master@{#453788}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: aa0d524b8614ab29c29b960ea87c7df647b99a03
2017-03-01 01:26:18 +00:00
agrieve 5974f7071e Make generate_gradle.py work with preview SDKs.
This just tweaks the values of buildToolsVersion and compileSdkVersion,
which were not being set in a way compatible with preview SDKs.

BUG=620034

Review-Url: https://codereview.chromium.org/2724513003
Cr-Original-Commit-Position: refs/heads/master@{#453737}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a04e1cf3d4912300d625a57318bc6f2ba53ba79
2017-02-28 23:22:08 +00:00
wnwen 0952b4961e Android: Android studio single module per target
Existing users can continue to split modules by gn targets by passing
--split-project to generate_gradle.py, although that flag will not
receive the same maintenance going forward, consider it deprecated.

This coalesces java and resource dependencies into the same build.gradle
file for each apk and junit target specified (test apks still get folded
into the apk_under_test target).

Speeds up sync/builds by 10x to 1-3 seconds. Paves the way for using
more of android studio's build steps, since they'll now take 1-3 seconds
rather than 10+ seconds each time.

BUG=620034

Review-Url: https://codereview.chromium.org/2708133002
Cr-Original-Commit-Position: refs/heads/master@{#453257}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 543908d37bb29cad0925a6553cb6a7261b222133
2017-02-27 18:09:29 +00:00
wnwen 35fe3e2a5f Android: Cache android studio project entries
- Add entry.AllEntries() in preparation for iterating through deps.
- Caching _ProjectEntry objects to avoid duplicate computation.
- Dedup template variables between androidTest and main.
- Minor clean-up.

BUG=620034

Review-Url: https://codereview.chromium.org/2697313004
Cr-Original-Commit-Position: refs/heads/master@{#451352}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8281f251376f2a21ad28737f5c7416f10c276d6f
2017-02-17 19:20:48 +00:00
agrieve 467b707bfe Plumb bootclasspath GN -> Android Studio
This fixes most compile issues with android_webview. There is still an
issue with a missing R.java though (updated comment in code about this).

BUG=620034

Review-Url: https://codereview.chromium.org/2699963002
Cr-Original-Commit-Position: refs/heads/master@{#451217}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a1c2f35132f2a07e14c64b633485195a705f848e
2017-02-17 04:44:48 +00:00
sakal f2a0a4e1ad Generate custom manifests when letting gradle process resources.
Gradle uses package id from manifest when generating R.class. So, we
need to generate a custom manifest if we let gradle process resources.

BUG=682846, webrtc:6328

Review-Url: https://codereview.chromium.org/2691353005
Cr-Original-Commit-Position: refs/heads/master@{#451029}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cab87bffc69256f873c19f5a977d35e290a180ee
2017-02-16 18:52:36 +00:00
sakal 095bb1b472 Enable asset tasks when using gradle to process resources.
This is needed to correctly generate a project for AppRTCMobile.

BUG=620034,webrtc:6328

Review-Url: https://codereview.chromium.org/2697293002
Cr-Original-Commit-Position: refs/heads/master@{#450985}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 41b7f2e4ce06ea76bb9dc23c752c6d1035ae6e27
2017-02-16 16:30:17 +00:00
sakal 176a1244e5 Do not enforce unique package name in gradle projects.
This is needed because multiple targets use the default Android manifest
with package name "dummy.package". This problem occurs when letting
gradle process resources.

BUG=682846,webrtc:6328

Review-Url: https://codereview.chromium.org/2699663004
Cr-Original-Commit-Position: refs/heads/master@{#450976}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b4ef9a4857c32338bc7b23e30708871b7541dec0
2017-02-16 15:49:21 +00:00
wnwen 333fa7c3dd Reland "Android: Add owned resources to android studio"
Original Reland: https://codereview.chromium.org/2687453002/

Changes:
- Fix TypeError: 'NoneType' object is not iterable

TBR=agrieve@chromium.org
BUG=682846

Review-Url: https://codereview.chromium.org/2680423005
Cr-Original-Commit-Position: refs/heads/master@{#449408}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0227e4a51b9dd67d5735d53aff95b8fa70a9e291
2017-02-09 21:14:51 +00:00
wnwen d693e8e16e Revert of Reland "Android: Add owned resources to android studio" (patchset #3 id:40001 of https://codereview.chromium.org/2687453002/ )
Reason for revert:
Nonetype is not iterable.

Original issue's description:
> Reland "Android: Add owned resources to android studio"
>
> Original CL: https://codereview.chromium.org/2667023002/
>
> Changes:
> - Generalize srcjars and resource zips to be generated together.
> - Update documentation
>
> BUG=682846
>
> Review-Url: https://codereview.chromium.org/2687453002
> Cr-Commit-Position: refs/heads/master@{#449345}
> Committed: 5c3f5db756

TBR=estevenson@chromium.org,agrieve@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=682846

Review-Url: https://codereview.chromium.org/2684843006
Cr-Original-Commit-Position: refs/heads/master@{#449375}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2542e2ce6ab3528312438f99808cb329e4f11ee9
2017-02-09 19:34:08 +00:00
wnwen d7d9387bde Reland "Android: Add owned resources to android studio"
Original CL: https://codereview.chromium.org/2667023002/

Changes:
- Generalize srcjars and resource zips to be generated together.
- Update documentation

BUG=682846

Review-Url: https://codereview.chromium.org/2687453002
Cr-Original-Commit-Position: refs/heads/master@{#449345}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5c3f5db756cc0aa3c9b27893a567131557a0a83c
2017-02-09 17:48:27 +00:00
wnwen fa619b2a12 Android: Replace symlinks with gradle filters
Use filters to exclude unwanted files from source directories instead of
creating symlink dirs for android studio gradle scripts.

Paves the way for multiple modules including the same source dirs.

BUG=690073

Review-Url: https://codereview.chromium.org/2682183002
Cr-Original-Commit-Position: refs/heads/master@{#449301}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9032b352ce46f107da00bf7b00ece989d86dcfb5
2017-02-09 15:53:33 +00:00
agrieve ab0bc7025a Revert of Android: Add owned resources to android studio (patchset #3 id:40001 of https://codereview.chromium.org/2667023002/ )
Reason for revert:
Script now fails if resources aren't already built

Original issue's description:
> Android: Add owned resources to android studio
>
> Include owned resources and unzip owned resource zips in android studio
> generated gradle projects. This allows a res directory to show up for
> each project.
>
> BUG=682846
>
> Review-Url: https://codereview.chromium.org/2667023002
> Cr-Commit-Position: refs/heads/master@{#447764}
> Committed: 9af0deb4bd

TBR=estevenson@chromium.org,wnwen@chromium.org
NOTRY=true
BUG=682846,688219

Review-Url: https://codereview.chromium.org/2678463003
Cr-Original-Commit-Position: refs/heads/master@{#448195}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11f780768683d40c8a159698c321707a299dbf1c
2017-02-06 00:35:42 +00:00
wnwen 41f3d91b7b Android: Add owned resources to android studio
Include owned resources and unzip owned resource zips in android studio
generated gradle projects. This allows a res directory to show up for
each project.

BUG=682846

Review-Url: https://codereview.chromium.org/2667023002
Cr-Original-Commit-Position: refs/heads/master@{#447764}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9af0deb4bd0d2eb6ec47063ce2a024641e0da52d
2017-02-02 14:16:20 +00:00
agrieve ddc0834400 Android: Auto-detect output directory in generate_gradle.py
BUG=none

Review-Url: https://codereview.chromium.org/2661243002
Cr-Original-Commit-Position: refs/heads/master@{#447328}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3cfd71affd2ece0c60efa1c1f98481ffae83d365
2017-01-31 21:04:58 +00:00
wnwen 4c65f6261e Android: Instrumentation tests in gradle
Add instrumentation tests as androidTest for gradle projects. May
require more tweaking to get all the dependencies/files generated.

BUG=680217

Review-Url: https://codereview.chromium.org/2633533002
Cr-Original-Commit-Position: refs/heads/master@{#444800}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5ee39c9a1b872d95800d7527dbc2ffe7b16cab93
2017-01-19 18:40:27 +00:00
wnwen 9ab52df74c Android: Split up build.gradle.jinja
Increase ninja concurrency from 50 to 1000. Load templates from script
directory. No visible changes except some whitespace differences.

BUG=680217

Review-Url: https://codereview.chromium.org/2621413002
Cr-Original-Commit-Position: refs/heads/master@{#443278}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 698728ae3b1ceb1cef98276d6e7fc06a1a63336f
2017-01-12 17:37:23 +00:00
sakal 7607e3c996 Add support for .so files in generate_gradle.py.
Only supports ARM for now.

BUG=620034

Review-Url: https://codereview.chromium.org/2622133004
Cr-Original-Commit-Position: refs/heads/master@{#443191}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 50e9d9c4ee8bd08fa12ed7e8715b42495a17e0b4
2017-01-12 09:41:08 +00:00
wnwen 447c899192 Android: Bump android studio gradle plugin version
BUG=676066

Review-Url: https://codereview.chromium.org/2589313003
Cr-Original-Commit-Position: refs/heads/master@{#440157}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5eacfcaac65bd1fba522c045d80e130854b86545
2016-12-21 18:24:15 +00:00
agrieve 8b423b8c73 Bump gradle version to appease Android Studio.
I see a "we recommend you upgrade" message on every gradle file sync.
This gets rid of the nagging.

BUG=620034

Review-Url: https://codereview.chromium.org/2577493003
Cr-Original-Commit-Position: refs/heads/master@{#438291}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6248702a749585cf219e929e29f26efc207fc233
2016-12-13 21:49:16 +00:00
agrieve 6159036222 generate_gradle.py: Add support for junit and java_binary targets
Rather than add all the features required by robolectric, this adds a
new "gradle_treat_as_prebuilt" flag that is set on a few targets.

BUG=620034

Review-Url: https://codereview.chromium.org/2508553002
Cr-Original-Commit-Position: refs/heads/master@{#432608}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2cefaf65d6362aadc536c1224e9981036cfb716f
2016-11-16 20:24:16 +00:00