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 file is meant to be included into a target to provide a rule to 6 # copy a prebuilt JAR for use on a host to the output directory. 7 # 8 # To use this, create a gyp target with the following form: 9 # { 10 # 'target_name': 'my_prebuilt_jar', 11 # 'type': 'none', 12 # 'variables': { 13 # 'jar_path': 'path/to/prebuilt.jar', 14 # }, 15 # 'includes': [ 'path/to/this/gypi/file' ], 16 # } 17 # 18 # Required variables: 19 # jar_path - The path to the prebuilt jar. 20 21 { 22 'dependencies': [ 23 ], 24 'variables': { 25 'dest_path': '<(PRODUCT_DIR)/lib.java/<(_target_name).jar', 26 'src_path': '<(jar_path)', 27 }, 28 'all_dependent_settings': { 29 'variables': { 30 'input_jars_paths': [ 31 '<(dest_path)', 32 ] 33 }, 34 }, 35 'actions': [ 36 { 37 'action_name': 'copy_prebuilt_jar', 38 'message': 'Copy <(src_path) to <(dest_path)', 39 'inputs': [ 40 '<(src_path)', 41 ], 42 'outputs': [ 43 '<(dest_path)', 44 ], 45 'action': [ 46 'python', '<(DEPTH)/build/cp.py', '<(src_path)', '<(dest_path)', 47 ], 48 } 49 ] 50 } 51