File: errorprone.gyp

package info (click to toggle)
qtwebengine-opensource-src 5.7.1+dfsg-6.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,028,096 kB
  • ctags: 1,436,736
  • sloc: cpp: 5,960,176; ansic: 3,477,727; asm: 395,492; python: 320,633; sh: 96,504; perl: 69,449; xml: 42,977; makefile: 28,408; objc: 9,962; yacc: 9,847; tcl: 5,430; lex: 2,259; ruby: 1,053; lisp: 522; awk: 497; pascal: 310; cs: 249; sed: 53
file content (132 lines) | stat: -rw-r--r-- 4,001 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Copyright 2014 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.

{
  'variables': {
    'errorprone_script_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone',
  },
  'targets': [
    {
      # GN: //third_party/errorprone:error_prone_annotation_java
      'target_name': 'error_prone_annotation_jar',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/error_prone_annotation-2.0.5.jar',
      },
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ]
    },
    {
      # GN: //third_party/errorprone:error_prone_annotations_java
      'target_name': 'error_prone_annotations_jar',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/error_prone_annotations-2.0.5.jar',
      },
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ]
    },
    {
      # GN: //third_party/errorprone:dataflow_java
      'target_name': 'dataflow_jar',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/dataflow-1.8.10.jar',
      },
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ]
    },
    {
      # GN: //third_party/errorprone:javacutil_java
      'target_name': 'javacutil_jar',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/javacutil-1.8.10.jar',
      },
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ]
    },
    {
      # GN: //third_party/errorprone:javac_java
      'target_name': 'javac_jar',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/javac-1.9.0-dev-r2644-1.jar',
      },
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ]
    },
    {
      # GN: //third_party/errorprone:chromium_errorprone
      'target_name': 'chromium_errorprone',
      'type': 'none',
      'variables': {
        'jar_path': 'lib/error_prone_core-2.0.5.jar',
      },
      'dependencies': [
        '../../third_party/findbugs/findbugs.gyp:format_string_jar',
        'error_prone_annotation_jar',
        'error_prone_annotations_jar',
        'dataflow_jar',
        'javac_jar',
        'javacutil_jar',
      ],
      'includes': [
        '../../build/host_prebuilt_jar.gypi',
      ],
      'actions': [
        {
          'action_name': 'create_errorprone_binary_script',
          'inputs': [
            '<(DEPTH)/build/android/gyp/create_java_binary_script.py',
            '<(DEPTH)/build/android/gyp/util/build_utils.py',
            # Ensure that the script is touched when the jar is.
            '<(jar_path)',
          ],
          'outputs': [
            '<(errorprone_script_path)',
          ],
          'action': [
            'python', '<(DEPTH)/build/android/gyp/create_java_binary_script.py',
            '--output', '<(PRODUCT_DIR)/bin.java/chromium_errorprone',
            # TODO(mikecase): Remove this extra arg when the bots are on jdk8 or higher.
            '--bootclasspath', '<(PRODUCT_DIR)/lib.java/javac_jar.jar',
            '--jar-path=<(jar_path)',
            '--classpath=>@(input_jars_paths)',
            '--main-class=com.google.errorprone.ErrorProneCompiler',
          ],
        },
      ],
    },
    {
      # This emulates gn's datadeps fields. We don't want the errorprone jars
      # to be added to the classpaths of targets that depend on errorprone.
      'target_name': 'require_errorprone',
      'type': 'none',
      'actions': [
        {
          'action_name': 'require_errorprone',
          'message': 'Making sure errorprone has been built.',
          'variables': {
            'required_file': '<(PRODUCT_DIR)/bin.java/errorprone.required',
          },
          'inputs': [
            '<(errorprone_script_path)',
          ],
          'outputs': [
            '<(required_file)',
          ],
          'action': [
            'python', '../../build/android/gyp/touch.py', '<(required_file)',
          ],
        },
      ],
    },
  ],
}