Home | History | Annotate | Download | only in android
      1 # Copyright 2015 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 file provides an action to generate Java source files from the Google
      6 # API keys using a Python script.
      7 
      8 {
      9   'targets': [
     10     {
     11       'target_name': 'google_api_keys_java',
     12       'type': 'none',
     13       'variables': {
     14         # Location where all generated Java sources will be placed.
     15         'output_dir': '<(SHARED_INTERMEDIATE_DIR)/java_google_api_keys',
     16         'generator_path': '<(DEPTH)/build/android/gyp/java_google_api_keys.py',
     17         'output_file': '<(output_dir)/GoogleAPIKeys.java',
     18       },
     19       'direct_dependent_settings': {
     20         'variables': {
     21           # Ensure that the output directory is used in the class path
     22           # when building targets that depend on this one.
     23           'generated_src_dirs': [
     24             '<(output_dir)/',
     25           ],
     26         },
     27       },
     28       'actions': [
     29         {
     30           'action_name': 'generate_java_google_api_keys',
     31           'inputs': [
     32             '<(generator_path)',
     33           ],
     34           'outputs': [
     35             '<(output_file)',
     36           ],
     37           'action': [
     38             'python', '<(generator_path)', '--out', '<(output_file)'
     39           ],
     40           'message': 'Generating Java from Google API Keys header',
     41         },
     42       ],
     43     },
     44   ],
     45 }
     46