Chromium Code Reviews| Index: chrome/chrome_shell.gypi |
| diff --git a/chrome/chrome_shell.gypi b/chrome/chrome_shell.gypi |
| index 686caf5e6b8380e6982d414608bfd84b62d3e2f6..e69822204fb74713cb79da2637f4b21e8323030e 100644 |
| --- a/chrome/chrome_shell.gypi |
| +++ b/chrome/chrome_shell.gypi |
| @@ -7,16 +7,10 @@ |
| # NOT contain chrome_android_core, which is independent of the chrome shell |
| # and should be separately customized. |
| { |
| - 'variables': { |
| - 'apk_name': 'ChromeShell', |
| - 'manifest_package_name': 'org.chromium.chrome.shell', |
| - 'native_lib_version_name': '<(version_full)', |
| - 'package_name': 'chrome_shell_apk', |
| - }, |
| 'targets': [ |
| { |
| - 'target_name': 'libchromeshell', |
| - 'type': 'shared_library', |
| + 'target_name': 'libchromeshell_base', |
| + 'type': 'static_library', |
| 'dependencies': [ |
| '../base/base.gyp:base', |
| 'chrome_android_core', |
| @@ -24,13 +18,8 @@ |
| '../content/content.gyp:content_app_browser', |
| ], |
| 'sources': [ |
| - # This file must always be included in the shared_library step to ensure |
| - # JNI_OnLoad is exported. |
| - 'app/android/chrome_jni_onload.cc', |
| - 'android/shell/chrome_main_delegate_chrome_shell_android.cc', |
| - 'android/shell/chrome_main_delegate_chrome_shell_android.h', |
| - "android/shell/chrome_shell_google_location_settings_helper.cc", |
| - "android/shell/chrome_shell_google_location_settings_helper.h", |
| + 'android/shell/chrome_shell_google_location_settings_helper.cc', |
| + 'android/shell/chrome_shell_google_location_settings_helper.h', |
| ], |
| 'include_dirs': [ |
| '../skia/config', |
| @@ -48,15 +37,46 @@ |
| '../base/allocator/allocator.gyp:allocator', ], |
| }], |
| ['OS=="android"', { |
| - 'ldflags': [ |
| - # Some android targets still depend on --gc-sections to link. |
| - # TODO: remove --gc-sections for Debug builds (crbug.com/159847). |
| - '-Wl,--gc-sections', |
| - ], |
| + 'direct_dependent_settings': { |
| + 'ldflags': [ |
| + # Some android targets still depend on --gc-sections to link. |
| + # TODO: remove --gc-sections for Debug builds (crbug.com/159847). |
| + '-Wl,--gc-sections', |
| + ], |
| + }, |
| }], |
| ], |
| }, |
| { |
| + 'target_name': 'libchromeshell', |
| + 'type': 'shared_library', |
| + 'sources': [ |
| + # This file must always be included in the shared_library step to ensure |
| + # JNI_OnLoad is exported. |
| + 'app/android/chrome_jni_onload.cc', |
| + 'android/shell/chrome_main_delegate_chrome_shell_android.cc', |
| + 'android/shell/chrome_main_delegate_chrome_shell_android.h', |
| + ], |
| + 'dependencies': [ |
| + 'libchromeshell_base', |
| + ], |
| + }, |
| + { |
| + 'target_name': 'libchromeshellfortest', |
| + 'type': 'shared_library', |
| + 'sources': [ |
| + # This file must always be included in the shared_library step to ensure |
| + # JNI_OnLoad is exported. |
| + 'app/android/chrome_jni_onload.cc', |
| + 'android/shell/chrome_main_delegate_chrome_shell_for_test_android.cc', |
| + 'android/shell/chrome_main_delegate_chrome_shell_for_test_android.h', |
| + ], |
| + 'dependencies': [ |
| + 'libchromeshell_base', |
| + '../sync/sync.gyp:test_support_sync_fake_server_android', |
| + ], |
| + }, |
| + { |
| 'target_name': 'chrome_shell_apk', |
| 'type': 'none', |
| 'dependencies': [ |
| @@ -66,6 +86,10 @@ |
| '../media/media.gyp:media_java', |
| ], |
| 'variables': { |
| + 'package_name': 'chrome_shell_apk', |
| + 'apk_name': 'ChromeShell', |
| + 'manifest_package_name': 'org.chromium.chrome.shell', |
|
pval...(no longer on Chromium)
2014/08/09 00:48:21
Is this variable used anywhere? I can't find any u
Yaron
2014/08/12 17:22:04
Looks to be dead code.
|
| + 'native_lib_version_name': '<(version_full)', |
| 'java_in_dir': 'android/shell/java', |
| 'resource_dir': 'android/shell/res', |
| 'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)', |
| @@ -74,24 +98,73 @@ |
| '<@(chrome_android_pak_output_resources)', |
| ], |
| }, |
| - 'includes': [ '../build/java_apk.gypi', ], |
| + 'includes': [ '../build/java_apk.gypi', 'chrome_android_paks.gypi', ], |
| + }, |
| + { |
| + 'target_name': 'chrome_shell_paks', |
|
Yaron
2014/08/12 17:22:04
Why do you have two separate paks targets? Seems l
pval...(no longer on Chromium)
2014/08/14 00:35:39
ah, good point. fixed.
|
| + 'variables': { |
| + 'package_name': 'chrome_shell_apk', |
| + }, |
| + 'type': 'none', |
| + 'dependencies': [ |
| + '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', |
| + '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources', |
| + ], |
| + 'copies': [ |
| + { |
| + 'destination': '<(chrome_android_pak_output_folder)', |
| + 'files': [ |
| + '<@(chrome_android_pak_input_resources)', |
| + ], |
| + } |
| + ], |
| + 'includes': [ 'chrome_android_paks.gypi', ], |
| + }, |
| + { |
| + 'target_name': 'chrome_shell_for_test_apk', |
|
pval...(no longer on Chromium)
2014/08/09 00:48:21
I really don't like the name for this APK (ChromeS
|
| + 'type': 'none', |
| + 'dependencies': [ |
| + 'chrome_java', |
| + 'chrome_shell_paks', |
| + 'libchromeshellfortest', |
| + '../media/media.gyp:media_java', |
| + '../sync/sync.gyp:sync_java_test_support', |
| + ], |
| + 'variables': { |
| + 'package_name': 'chrome_shell_for_test_apk', |
| + 'apk_name': 'ChromeShellForTest', |
| + 'manifest_package_name': 'org.chromium.chrome.shellfortest', |
| + 'android_manifest_path': 'android/shell/fortest/AndroidManifest.xml', |
| + 'R_package': 'org.chromium.chrome.shell', |
| + 'native_lib_version_name': '<(version_full)', |
| + 'java_in_dir': 'android/shell/java', |
| + 'resource_dir': 'android/shell/res', |
| + 'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)', |
| + 'native_lib_target': 'libchromeshellfortest', |
| + 'additional_input_paths': [ |
| + '<@(chrome_android_pak_output_resources)', |
| + ], |
| + }, |
| + 'includes': [ '../build/java_apk.gypi', 'chrome_android_paks.gypi', ], |
| }, |
| { |
| - # chrome_shell_apk creates a .jar as a side effect. Any java targets |
| - # that need that .jar in their classpath should depend on this target, |
| - # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its |
| - # jar path in the variable 'apk_output_jar_path'. |
| - # This target should only be used by targets which instrument |
| - # chrome_shell_apk. |
| - 'target_name': 'chrome_shell_apk_java', |
| + # chrome_shell_for_test_apk creates a .jar as a side effect. Any java |
| + # targets that need that .jar in their classpath should depend on this |
| + # target. Dependents of chrome_shell_apk receive its jar path in the |
| + # variable 'apk_output_jar_path'. This target should only be used by |
| + # targets which instrument chrome_shell_for_test_apk. |
| + 'target_name': 'chrome_shell_for_test_apk_java', |
| 'type': 'none', |
| 'dependencies': [ |
| - 'chrome_shell_apk', |
| + 'chrome_shell_for_test_apk', |
| ], |
| 'includes': [ '../build/apk_fake_jar.gypi' ], |
| }, |
| { |
| - 'target_name': 'chrome_shell_paks', |
| + 'target_name': 'chrome_shell_for_test_paks', |
| + 'variables': { |
| + 'package_name': 'chrome_shell_for_test_apk', |
| + }, |
| 'type': 'none', |
| 'dependencies': [ |
| '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources', |
| @@ -105,6 +178,7 @@ |
| ], |
| } |
| ], |
| + 'includes': [ 'chrome_android_paks.gypi', ], |
| }, |
| ], |