Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: build/android/java_cpp_template.gypi

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/java_cpp_enum.gypi ('k') | build/android/jinja_template.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 # This file is meant to be included into a target to provide a rule
6 # to generate Java source files from templates that are processed
7 # through the host C pre-processor.
8 #
9 # NOTE: For generating Java conterparts to enums prefer using the java_cpp_enum
10 # rule instead.
11 #
12 # To use this, create a gyp target with the following form:
13 # {
14 # 'target_name': 'android_net_java_constants',
15 # 'type': 'none',
16 # 'sources': [
17 # 'net/android/NetError.template',
18 # ],
19 # 'variables': {
20 # 'package_name': 'org/chromium/net',
21 # 'template_deps': ['base/net_error_list.h'],
22 # },
23 # 'includes': [ '../build/android/java_cpp_template.gypi' ],
24 # },
25 #
26 # The 'sources' entry should only list template file. The template file
27 # itself should use the 'ClassName.template' format, and will generate
28 # 'gen/templates/<target-name>/<package-name>/ClassName.java. The files which
29 # template dependents on and typically included by the template should be listed
30 # in template_deps variables. Any change to them will force a rebuild of
31 # the template, and hence of any source that depends on it.
32 #
33
34 {
35 # Location where all generated Java sources will be placed.
36 'variables': {
37 'include_path%': '<(DEPTH)',
38 'output_dir': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/<(packag e_name)',
39 },
40 'direct_dependent_settings': {
41 'variables': {
42 # Ensure that the output directory is used in the class path
43 # when building targets that depend on this one.
44 'generated_src_dirs': [
45 '<(output_dir)/',
46 ],
47 # Ensure dependents are rebuilt when sources for this rule change.
48 'additional_input_paths': [
49 '<@(_sources)',
50 '<@(template_deps)',
51 ],
52 },
53 },
54 # Define a single rule that will be apply to each .template file
55 # listed in 'sources'.
56 'rules': [
57 {
58 'rule_name': 'generate_java_constants',
59 'extension': 'template',
60 # Set template_deps as additional dependencies.
61 'variables': {
62 'output_path': '<(output_dir)/<(RULE_INPUT_ROOT).java',
63 },
64 'inputs': [
65 '<(DEPTH)/build/android/gyp/util/build_utils.py',
66 '<(DEPTH)/build/android/gyp/gcc_preprocess.py',
67 '<@(template_deps)'
68 ],
69 'outputs': [
70 '<(output_path)',
71 ],
72 'action': [
73 'python', '<(DEPTH)/build/android/gyp/gcc_preprocess.py',
74 '--include-path=<(include_path)',
75 '--output=<(output_path)',
76 '--template=<(RULE_INPUT_PATH)',
77 ],
78 'message': 'Generating Java from cpp template <(RULE_INPUT_PATH)',
79 }
80 ],
81 }
OLDNEW
« no previous file with comments | « build/android/java_cpp_enum.gypi ('k') | build/android/jinja_template.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698