| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
| 6 # to build Java in a consistent manner. | 6 # to build Java in a consistent manner. |
| 7 # | 7 # |
| 8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
| 9 # { | 9 # { |
| 10 # 'target_name': 'my-package_java', | 10 # 'target_name': 'my-package_java', |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 # additional_input_paths - These paths will be included in the 'inputs' list to | 27 # additional_input_paths - These paths will be included in the 'inputs' list to |
| 28 # ensure that this target is rebuilt when one of these paths changes. | 28 # ensure that this target is rebuilt when one of these paths changes. |
| 29 # additional_src_dirs - Additional directories with .java files to be compiled | 29 # additional_src_dirs - Additional directories with .java files to be compiled |
| 30 # and included in the output of this target. | 30 # and included in the output of this target. |
| 31 # generated_src_dirs - Same as additional_src_dirs except used for .java files | 31 # generated_src_dirs - Same as additional_src_dirs except used for .java files |
| 32 # that are generated at build time. This should be set automatically by a | 32 # that are generated at build time. This should be set automatically by a |
| 33 # target's dependencies. The .java files in these directories are not | 33 # target's dependencies. The .java files in these directories are not |
| 34 # included in the 'inputs' list (unlike additional_src_dirs). | 34 # included in the 'inputs' list (unlike additional_src_dirs). |
| 35 # input_jars_paths - The path to jars to be included in the classpath. This | 35 # input_jars_paths - The path to jars to be included in the classpath. This |
| 36 # should be filled automatically by depending on the appropriate targets. | 36 # should be filled automatically by depending on the appropriate targets. |
| 37 # include_files - A list of specific files to include. This is by default |
| 38 # empty, which leads to inclusion of all files specified. May include |
| 39 # wildcard, and supports '**/' for recursive path wildcards, ie.: |
| 40 # '**/MyFileRegardlessOfDirectory.java', '**/IncludedPrefix*.java'. |
| 37 | 41 |
| 38 { | 42 { |
| 39 'dependencies': [ | 43 'dependencies': [ |
| 40 '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs' | 44 '<(DEPTH)/build/build_output_dirs_android.gyp:build_output_dirs' |
| 41 ], | 45 ], |
| 42 # This all_dependent_settings is used for java targets only. This will add the | 46 # This all_dependent_settings is used for java targets only. This will add the |
| 43 # chromium_<(package_name) jar to the classpath of dependent java targets. | 47 # chromium_<(package_name) jar to the classpath of dependent java targets. |
| 44 'all_dependent_settings': { | 48 'all_dependent_settings': { |
| 45 'variables': { | 49 'variables': { |
| 46 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar
'], | 50 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar
'], |
| 47 }, | 51 }, |
| 48 }, | 52 }, |
| 49 'variables': { | 53 'variables': { |
| 50 'input_jars_paths': [], | 54 'input_jars_paths': [], |
| 51 'additional_src_dirs': [], | 55 'additional_src_dirs': [], |
| 52 'additional_input_paths': [], | 56 'additional_input_paths': [], |
| 53 'generated_src_dirs': [], | 57 'generated_src_dirs': [], |
| 58 'javac_includes': [], |
| 54 }, | 59 }, |
| 55 'actions': [ | 60 'actions': [ |
| 56 { | 61 { |
| 57 'action_name': 'ant_<(package_name)', | 62 'action_name': 'ant_<(package_name)', |
| 58 'message': 'Building <(package_name) java sources.', | 63 'message': 'Building <(package_name) java sources.', |
| 59 'inputs': [ | 64 'inputs': [ |
| 60 'android/ant/common.xml', | 65 'android/ant/common.xml', |
| 61 'android/ant/chromium-jars.xml', | 66 'android/ant/chromium-jars.xml', |
| 62 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 67 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
| 63 '>@(input_jars_paths)', | 68 '>@(input_jars_paths)', |
| 64 '>@(additional_input_paths)', | 69 '>@(additional_input_paths)', |
| 65 ], | 70 ], |
| 66 'outputs': [ | 71 'outputs': [ |
| 67 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', | 72 '<(PRODUCT_DIR)/lib.java/chromium_<(package_name).jar', |
| 68 ], | 73 ], |
| 69 'action': [ | 74 'action': [ |
| 70 'ant', | 75 'ant', |
| 71 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', | 76 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', |
| 72 '-DANDROID_SDK=<(android_sdk)', | 77 '-DANDROID_SDK=<(android_sdk)', |
| 73 '-DANDROID_SDK_ROOT=<(android_sdk_root)', | 78 '-DANDROID_SDK_ROOT=<(android_sdk_root)', |
| 74 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', | 79 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', |
| 75 '-DANDROID_SDK_VERSION=<(android_sdk_version)', | 80 '-DANDROID_SDK_VERSION=<(android_sdk_version)', |
| 76 '-DANDROID_GDBSERVER=<(android_gdbserver)', | 81 '-DANDROID_GDBSERVER=<(android_gdbserver)', |
| 77 '-DPRODUCT_DIR=<(ant_build_out)', | 82 '-DPRODUCT_DIR=<(ant_build_out)', |
| 78 | 83 |
| 79 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', | 84 '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)', |
| 80 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', | 85 '-DGENERATED_SRC_DIRS=>(generated_src_dirs)', |
| 81 '-DINPUT_JARS_PATHS=>(input_jars_paths)', | 86 '-DINPUT_JARS_PATHS=>(input_jars_paths)', |
| 82 '-DPACKAGE_NAME=<(package_name)', | 87 '-DPACKAGE_NAME=<(package_name)', |
| 88 '-DJAVAC_INCLUDES=>(javac_includes)', |
| 83 | 89 |
| 84 '-Dbasedir=<(java_in_dir)', | 90 '-Dbasedir=<(java_in_dir)', |
| 85 '-buildfile', | 91 '-buildfile', |
| 86 '<(DEPTH)/build/android/ant/chromium-jars.xml' | 92 '<(DEPTH)/build/android/ant/chromium-jars.xml' |
| 87 ] | 93 ] |
| 88 }, | 94 }, |
| 89 ], | 95 ], |
| 90 } | 96 } |
| OLD | NEW |