Skip to content

Commit

Permalink
Remove {base,net}_java dependencies from GYP client targets on Android.
Browse files Browse the repository at this point in the history
On Android, some GYP client targets were explicitly depending on both the
native and Java sides of a library.
This removes the dependencies to {base,net}_java and make the native side
('base' and 'net) of these libraries depend on their Java counterpart.
On Android it rarely makes sense to depend on a single side of a Java/C++
library.
The {base,net}_java can now be considered as "private" targets although GYP
does not support this concept unfortunately (AFAICT).
Note that I made sure that the resulting APKs' size is unchanged.

Additionally, this CL removes 'base_java' (i.e. does not replace it with
'base') from the targets including 'build/apk_test.gypi'. This dependency
should not have been there (in the wrong layer) in the first place. It's needed
by ChromeNativeTestActivity.java which clients should not know about.

BUG=146323
TBR=lipalani,sky,willchan,brettw

Review URL: https://chromiumcodereview.appspot.com/10913083

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155737 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
pliard@chromium.org committed Sep 10, 2012
1 parent 0603f9c commit bb6bd1f
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 25 deletions.
6 changes: 5 additions & 1 deletion base/base.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@
}],
],
'dependencies': [
'base_java',
'base_jni_headers',
'symbolize',
'../third_party/ashmem/ashmem.gyp:ashmem',
'../third_party/icu/icu.gyp:icuuc',
'base_jni_headers',
],
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/base',
Expand All @@ -141,6 +142,9 @@
'sources!': [
'debug/stack_trace_posix.cc',
],
'export_dependent_settings': [
'base_java',
],
}],
['os_bsd==1', {
'include_dirs': [
Expand Down
5 changes: 4 additions & 1 deletion build/apk_test.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

{
'variables': {
'input_jars_paths': [],
'input_jars_paths': [
# Needed by ChromeNativeTestActivity.java.
'<(PRODUCT_DIR)/lib.java/chromium_base.jar',
],
},
'target_conditions': [
['_toolset == "target"', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'target_name': 'web_contents_delegate_android_java',
'type': 'none',
'dependencies': [
'<(DEPTH)/base/base.gyp:base_java',
'<(DEPTH)/base/base.gyp:base',
],
'variables': {
'package_name': 'web_contents_delegate_android',
Expand Down
6 changes: 2 additions & 4 deletions chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,16 +1077,14 @@
'target_name': 'chrome_java',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
'../chrome/browser/component/components.gyp:web_contents_delegate_android_java',
'../content/content.gyp:content_java',
'../net/net.gyp:net_java',
],
'export_dependent_settings': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
'../chrome/browser/component/components.gyp:web_contents_delegate_android_java',
'../content/content.gyp:content_java',
'../net/net.gyp:net_java',
],
'variables': {
'package_name': 'chrome',
Expand Down
8 changes: 4 additions & 4 deletions content/content.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@
'target_name': 'content_java',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'../net/net.gyp:net_java',
'../base/base.gyp:base',
'../net/net.gyp:net',
'common_aidl',
'content_common',
],
'export_dependent_settings': [
'../base/base.gyp:base_java',
'../net/net.gyp:net_java',
'../base/base.gyp:base',
'../net/net.gyp:net',
],
'variables': {
'package_name': 'content',
Expand Down
4 changes: 1 addition & 3 deletions content/content_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@
'target_name': 'content_unittests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'../net/net.gyp:net_java',
'content_java',
'content_unittests',
],
Expand All @@ -806,7 +804,7 @@
'target_name': 'content_javatests',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
'../base/base.gyp:base_java_test_support',
'content_common',
'content_java',
Expand Down
1 change: 0 additions & 1 deletion gpu/gpu_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
'target_name': 'gpu_unittests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'gpu_unittests',
],
'variables': {
Expand Down
1 change: 0 additions & 1 deletion ipc/ipc.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
'target_name': 'ipc_tests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'ipc_tests',
],
'variables': {
Expand Down
4 changes: 2 additions & 2 deletions media/media.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,10 +1159,10 @@
'target_name': 'media_java',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
],
'export_dependent_settings': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
],
'variables': {
'package_name': 'media',
Expand Down
18 changes: 14 additions & 4 deletions net/net.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,14 @@
],
},
],
['OS=="android" and _toolset=="target"', {
'dependencies': [
'net_java',
],
'export_dependent_settings': [
'net_java',
],
}],
[ 'OS == "android"', {
'dependencies': [
'../third_party/openssl/openssl.gyp:openssl',
Expand Down Expand Up @@ -2102,10 +2110,10 @@
'java_in_dir': '../net/android/java',
},
'dependencies': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
],
'export_dependent_settings': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
],
'includes': [ '../build/java.gypi' ],
},
Expand All @@ -2117,12 +2125,14 @@
'java_in_dir': '../net/android/javatests',
},
'dependencies': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
'../base/base.gyp:base_java_test_support',
'net_java',
],
'export_dependent_settings': [
'../base/base.gyp:base_java',
'../base/base.gyp:base',
'../base/base.gyp:base_java_test_support',
'net_java',
],
'includes': [ '../build/java.gypi' ],
},
Expand Down
1 change: 0 additions & 1 deletion sql/sql.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
'target_name': 'sql_unittests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'sql_unittests',
],
'variables': {
Expand Down
1 change: 0 additions & 1 deletion sync/sync.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@
'target_name': 'sync_unit_tests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'sync_unit_tests',
],
'variables': {
Expand Down
1 change: 0 additions & 1 deletion ui/ui_unittests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@
'target_name': 'ui_unittests_apk',
'type': 'none',
'dependencies': [
'../base/base.gyp:base_java',
'ui_unittests',
],
'variables': {
Expand Down

0 comments on commit bb6bd1f

Please sign in to comment.