summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_shell.gypi
blob: 686caf5e6b8380e6982d414608bfd84b62d3e2f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This GYPI allows independent customization of the chrome shell in a manner
# similar to content shell (in content_shell.gypi). Notably, this file does
# 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',
      '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/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",
      ],
      'include_dirs': [
        '../skia/config',
      ],
      'conditions': [
        [ 'order_profiling!=0', {
          'conditions': [
            [ 'OS=="android"', {
              'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
            }],
          ],
        }],
        [ 'use_allocator!="none"', {
          'dependencies': [
            '../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',
          ],
        }],
      ],
    },
    {
      'target_name': 'chrome_shell_apk',
      'type': 'none',
      'dependencies': [
        'chrome_java',
        'chrome_shell_paks',
        'libchromeshell',
        '../media/media.gyp:media_java',
      ],
      'variables': {
        'java_in_dir': 'android/shell/java',
        'resource_dir': 'android/shell/res',
        'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
        'native_lib_target': 'libchromeshell',
        'additional_input_paths': [
          '<@(chrome_android_pak_output_resources)',
        ],
      },
      'includes': [ '../build/java_apk.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',
      'type': 'none',
      'dependencies': [
        'chrome_shell_apk',
      ],
      'includes': [ '../build/apk_fake_jar.gypi' ],
    },
    {
      'target_name': 'chrome_shell_paks',
      '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)',
          ],
        }
      ],
    },
  ],

}