Home | History | Annotate | Download | only in chrome
      1 # Copyright 2014 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 # This GYPI allows independent customization of the chrome shell in a manner
      6 # similar to content shell (in content_shell.gypi). Notably, this file does
      7 # NOT contain chrome_android_core, which is independent of the chrome shell
      8 # and should be separately customized.
      9 {
     10   'variables': {
     11     'package_name': 'chrome_shell_apk',
     12   },
     13   'targets': [
     14     {
     15       'target_name': 'libchromeshell_base',
     16       'type': 'static_library',
     17       'dependencies': [
     18         '../base/base.gyp:base',
     19         'chrome_android_core',
     20         'chrome.gyp:browser_ui',
     21         '../content/content.gyp:content_app_browser',
     22       ],
     23       'sources': [
     24         'android/shell/chrome_shell_google_location_settings_helper.cc',
     25         'android/shell/chrome_shell_google_location_settings_helper.h',
     26       ],
     27       'include_dirs': [
     28         '../skia/config',
     29       ],
     30       'conditions': [
     31         [ 'order_profiling!=0', {
     32           'conditions': [
     33             [ 'OS=="android"', {
     34               'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
     35             }],
     36           ],
     37         }],
     38         [ 'use_allocator!="none"', {
     39           'dependencies': [
     40             '../base/allocator/allocator.gyp:allocator', ],
     41         }],
     42         ['OS=="android"', {
     43           'direct_dependent_settings': {
     44             'ldflags': [
     45               # Some android targets still depend on --gc-sections to link.
     46               # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
     47               '-Wl,--gc-sections',
     48             ],
     49           },
     50         }],
     51       ],
     52     },
     53     {
     54       'target_name': 'libchromeshell',
     55       'type': 'shared_library',
     56       'sources': [
     57         # This file must always be included in the shared_library step to ensure
     58         # JNI_OnLoad is exported.
     59         'app/android/chrome_jni_onload.cc',
     60         'android/shell/chrome_main_delegate_chrome_shell_android.cc',
     61         'android/shell/chrome_main_delegate_chrome_shell_android.h',
     62       ],
     63       'dependencies': [
     64         'libchromeshell_base',
     65       ],
     66     },
     67     {
     68       'target_name': 'libchromesyncshell',
     69       'type': 'shared_library',
     70       'sources': [
     71         # This file must always be included in the shared_library step to ensure
     72         # JNI_OnLoad is exported.
     73         'app/android/chrome_jni_onload.cc',
     74         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc',
     75         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.h',
     76       ],
     77       'dependencies': [
     78         'libchromeshell_base',
     79         '../sync/sync.gyp:test_support_sync_fake_server_android',
     80       ],
     81     },
     82     {
     83       'target_name': 'chrome_shell_apk',
     84       'type': 'none',
     85       'dependencies': [
     86         'chrome_java',
     87         'chrome_shell_paks',
     88         'libchromeshell',
     89         '../media/media.gyp:media_java',
     90       ],
     91       'variables': {
     92         'apk_name': 'ChromeShell',
     93         'native_lib_version_name': '<(version_full)',
     94         'java_in_dir': 'android/shell/java',
     95         'resource_dir': 'android/shell/res',
     96         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
     97         'native_lib_target': 'libchromeshell',
     98         'additional_input_paths': [
     99           '<@(chrome_android_pak_output_resources)',
    100         ],
    101       },
    102       'includes': [ '../build/java_apk.gypi', ],
    103     },
    104     {
    105       # chrome_shell_apk creates a .jar as a side effect. Any java targets
    106       # that need that .jar in their classpath should depend on this target,
    107       # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
    108       # jar path in the variable 'apk_output_jar_path'.
    109       # This target should only be used by targets which instrument
    110       # chrome_shell_apk.
    111       'target_name': 'chrome_shell_apk_java',
    112       'type': 'none',
    113       'dependencies': [
    114         'chrome_shell_apk',
    115       ],
    116       'includes': [ '../build/apk_fake_jar.gypi' ],
    117     },
    118     {
    119       'target_name': 'chrome_shell_paks',
    120       'type': 'none',
    121       'dependencies': [
    122         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
    123         '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
    124       ],
    125       'copies': [
    126         {
    127           'destination': '<(chrome_android_pak_output_folder)',
    128           'files': [
    129             '<@(chrome_android_pak_input_resources)',
    130           ],
    131         }
    132       ],
    133     },
    134     {
    135       'target_name': 'chrome_sync_shell_apk',
    136       'type': 'none',
    137       'dependencies': [
    138         'chrome_java',
    139         'chrome_shell_paks',
    140         'libchromesyncshell',
    141         '../media/media.gyp:media_java',
    142         '../sync/sync.gyp:sync_java_test_support',
    143       ],
    144       'variables': {
    145         'apk_name': 'ChromeSyncShell',
    146         'android_manifest_path': 'android/sync_shell/java/AndroidManifest.xml',
    147         'R_package': 'org.chromium.chrome.shell',
    148         'native_lib_version_name': '<(version_full)',
    149         'java_in_dir': 'android/shell/java',
    150         'resource_dir': 'android/shell/res',
    151         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
    152         'native_lib_target': 'libchromesyncshell',
    153         'additional_input_paths': [
    154           '<@(chrome_android_pak_output_resources)',
    155         ],
    156       },
    157       'includes': [ '../build/java_apk.gypi', ],
    158     },
    159     {
    160       # chrome_sync_shell_apk creates a .jar as a side effect. Any java
    161       # targets that need that .jar in their classpath should depend on this
    162       # target. Dependents of chrome_sync_shell_apk receive its jar path in the
    163       # variable 'apk_output_jar_path'. This target should only be used by
    164       # targets which instrument chrome_sync_shell_apk.
    165       'target_name': 'chrome_sync_shell_apk_java',
    166       'type': 'none',
    167       'dependencies': [
    168         'chrome_sync_shell_apk',
    169       ],
    170       'includes': [ '../build/apk_fake_jar.gypi' ],
    171     },
    172   ],
    173 
    174 }
    175