{
'variables': {
'chromium_code': 1,
- 'package_name': 'chromium_testshell',
+ 'conditions': [
+ ['component != "shared_library" and target_arch != "arm64" and target_arch != "x64" and profiling_full_stack_frames != 1', {
+ # Only enable the chromium linker on regular builds, since the
+ # component build crashes on Android 4.4. See b/11379966
+ 'use_chromium_linker': '1',
+ }],
+ ],
},
'includes': [
'chrome_android_paks.gypi', # Included for the list of pak resources.
+ 'chrome_shell.gypi', # Built atop chrome_android_core (defined here)
],
'targets': [
{
- 'target_name': 'libchromiumtestshell',
- 'type': 'shared_library',
- 'dependencies': [
- '../base/base.gyp:base',
- 'chrome_android_core',
- 'chrome.gyp:browser_ui',
- '../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/testshell/chrome_main_delegate_testshell_android.cc',
- 'android/testshell/chrome_main_delegate_testshell_android.h',
- "android/testshell/testshell_google_location_settings_helper.cc",
- "android/testshell/testshell_google_location_settings_helper.h",
- ],
- 'include_dirs': [
- '../skia/config',
- ],
- 'conditions': [
- [ 'order_profiling!=0', {
- 'conditions': [
- [ 'OS=="android"', {
- 'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
- }],
- ],
- }],
- [ 'android_use_tcmalloc==1', {
- 'dependencies': [
- '../base/allocator/allocator.gyp:allocator', ],
- }],
- ],
- },
- {
- 'target_name': 'chromium_testshell',
- 'type': 'none',
- 'dependencies': [
- '../media/media.gyp:media_java',
- 'chrome.gyp:chrome_java',
- 'chromium_testshell_paks',
- 'libchromiumtestshell',
- ],
- 'variables': {
- 'apk_name': 'ChromiumTestShell',
- 'manifest_package_name': 'org.chromium.chrome.testshell',
- 'java_in_dir': 'android/testshell/java',
- 'resource_dir': 'android/testshell/res',
- 'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
- 'native_lib_target': 'libchromiumtestshell',
- 'native_lib_version_name': '<(version_full)',
- 'additional_input_paths': [
- '<@(chrome_android_pak_output_resources)',
- ],
- },
- 'includes': [ '../build/java_apk.gypi', ],
- },
- {
- # chromium_testshell creates a .jar as a side effect. Any java targets
- # that need that .jar in their classpath should depend on this target,
- # chromium_testshell_java. Dependents of chromium_testshell receive its
- # jar path in the variable 'apk_output_jar_path'.
- 'target_name': 'chromium_testshell_java',
- 'type': 'none',
- 'dependencies': [
- 'chromium_testshell',
- ],
- 'includes': [ '../build/apk_fake_jar.gypi' ],
- },
- {
+ # GN: //chrome:chrome_android_core
'target_name': 'chrome_android_core',
'type': 'static_library',
'dependencies': [
'chrome.gyp:plugin',
'chrome.gyp:renderer',
'chrome.gyp:utility',
+ # TODO(kkimlabs): Move this to chrome.gyp:browser when the dependent
+ # is upstreamed.
+ '../components/components.gyp:enhanced_bookmarks',
'../content/content.gyp:content',
'../content/content.gyp:content_app_browser',
],
},
},
{
- 'target_name': 'chromium_testshell_paks',
+ # GYP: //chrome/android:chrome_version_java
+ 'target_name': 'chrome_version_java',
'type': 'none',
- 'dependencies': [
- '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
- '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
- ],
- 'copies': [
+ 'variables': {
+ 'template_input_path': 'android/java/ChromeVersionConstants.java.version',
+ 'version_path': 'VERSION',
+ 'version_py_path': '<(DEPTH)/build/util/version.py',
+ 'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/chrome/browser/ChromeVersionConstants.java',
+
+ 'conditions': [
+ ['branding == "Chrome"', {
+ 'branding_path': 'app/theme/google_chrome/BRANDING',
+ }, {
+ 'branding_path': 'app/theme/chromium/BRANDING',
+ }],
+ ],
+ },
+ 'direct_dependent_settings': {
+ 'variables': {
+ # Ensure that the output directory is used in the class path
+ # when building targets that depend on this one.
+ 'generated_src_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
+ ],
+ # Ensure dependents are rebuilt when the generated Java file changes.
+ 'additional_input_paths': [
+ '<(output_path)',
+ ],
+ },
+ },
+ 'actions': [
{
- 'destination': '<(chrome_android_pak_output_folder)',
- 'files': [
- '<@(chrome_android_pak_input_resources)',
+ 'action_name': 'chrome_version_java_template',
+ 'inputs': [
+ '<(template_input_path)',
+ '<(version_path)',
+ '<(branding_path)',
+ '<(version_py_path)',
+ ],
+ 'outputs': [
+ '<(output_path)',
+ ],
+ 'action': [
+ 'python',
+ '<(version_py_path)',
+ '-f', '<(version_path)',
+ '-f', '<(branding_path)',
+ '-e', 'CHANNEL=str.upper("<(android_channel)")',
+ '<(template_input_path)',
+ '<(output_path)',
],
- }
+ },
],
},
],