Index: build/android/java_google_api_keys.gypi |
diff --git a/build/android/java_google_api_keys.gypi b/build/android/java_google_api_keys.gypi |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ff0103caa8ac0d5b7ffa005070b065ea9f74183a |
--- /dev/null |
+++ b/build/android/java_google_api_keys.gypi |
@@ -0,0 +1,50 @@ |
+# Copyright 2015 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 file is meant to be included into a target to provide an action |
+# to generate Java source files from the Google API keys using a Python script. |
+# |
+# To use this, create a gyp target with the following form: |
+# { |
+# 'target_name': 'google_api_keys_java', |
+# 'type': 'none', |
+# 'includes': [ '../build/android/java_google_api_keys.gypi' ], |
+# }, |
+# |
+# Then have the gyp target which compiles the java code depend on the newly |
+# created target. |
+ |
+{ |
+ 'variables': { |
+ # Location where all generated Java sources will be placed. |
+ 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/java_google_api_keys', |
+ 'generator_path': '<(DEPTH)/build/android/gyp/java_google_api_keys.py', |
+ 'output_file': '<(output_dir)/GoogleAPIKeys.java', |
+ }, |
+ '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': [ |
+ '<(output_dir)/', |
+ ], |
+ }, |
+ }, |
+ 'actions': [ |
+ { |
+ 'action_name': 'generate_java_google_api_keys', |
+ 'inputs': [ |
+ '<(DEPTH)/build/android/gyp/java_google_api_keys.py', |
+ '<(generator_path)', |
+ ], |
+ 'outputs': [ |
+ '<(output_file)', |
+ ], |
+ 'action': [ |
+ 'python', '<(generator_path)', '--out', '<(output_file)' |
+ ], |
+ 'message': 'Generating Java from Google API Keys header', |
+ }, |
+ ], |
+} |