• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 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  'conditions': [
6    ['android_must_copy_system_libraries == 1', {
7      'targets': [
8        {
9          # These libraries from the Android ndk are required to be packaged with
10          # any APK that is built with them. build/java_apk.gypi expects any
11          # libraries that should be packaged with the apk to be in
12          # <(SHARED_LIB_DIR)
13          'target_name': 'copy_system_libraries',
14          'type': 'none',
15          'copies': [
16            {
17              'destination': '<(SHARED_LIB_DIR)/',
18              'files': [
19                '<(android_libcpp_libs_dir)/libc++_shared.so',
20              ],
21            },
22          ],
23        },
24      ],
25    }],
26  ],
27  'targets': [
28    {
29      'target_name': 'get_build_device_configurations',
30      'type': 'none',
31      'actions': [
32        {
33          'action_name': 'get configurations',
34          'inputs': [
35            'gyp/util/build_device.py',
36            'gyp/get_device_configuration.py',
37          ],
38          'outputs': [
39            '<(build_device_config_path)',
40            '<(build_device_config_path).fake',
41          ],
42          'action': [
43            'python', 'gyp/get_device_configuration.py',
44            '--output=<(build_device_config_path)',
45            '--output-directory=<(PRODUCT_DIR)',
46          ],
47        }
48      ],
49    },
50    {
51      # Target for creating common output build directories. Creating output
52      # dirs beforehand ensures that build scripts can assume these folders to
53      # exist and there are no race conditions resulting from build scripts
54      # trying to create these directories.
55      # The build/java.gypi target depends on this target.
56      'target_name': 'build_output_dirs',
57      'type': 'none',
58      'actions': [
59        {
60          'action_name': 'create_java_output_dirs',
61          'variables' : {
62            'output_dirs' : [
63              '<(PRODUCT_DIR)/apks',
64              '<(PRODUCT_DIR)/lib.java',
65              '<(PRODUCT_DIR)/test.lib.java',
66            ]
67          },
68          'inputs' : [],
69          # By not specifying any outputs, we ensure that this command isn't
70          # re-run when the output directories are touched (i.e. apks are
71          # written to them).
72          'outputs': [''],
73          'action': [
74            'mkdir',
75            '-p',
76            '<@(output_dirs)',
77          ],
78        },
79      ],
80    }, # build_output_dirs
81    {
82      'target_name': 'sun_tools_java',
83      'type': 'none',
84      'variables': {
85        'found_jar_path': '<(PRODUCT_DIR)/sun_tools_java/tools.jar',
86        'jar_path': '<(found_jar_path)',
87      },
88      'includes': [
89        '../../build/host_prebuilt_jar.gypi',
90      ],
91      'actions': [
92        {
93          'action_name': 'find_sun_tools_jar',
94          'variables' : {
95          },
96          'inputs' : [
97            'gyp/find_sun_tools_jar.py',
98            'gyp/util/build_utils.py',
99          ],
100          'outputs': [
101            '<(found_jar_path)',
102          ],
103          'action': [
104            'python', 'gyp/find_sun_tools_jar.py',
105            '--output', '<(found_jar_path)',
106          ],
107        },
108      ],
109    }, # sun_tools_java
110  ]
111}
112
113