aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/apple/ObjcProviderApi.java
blob: 1d44e3adee42ee3c8ad7dfb6abebcf6ecd92e7d9 (plain)
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
// Copyright 2018 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.devtools.build.lib.skylarkbuildapi.apple;

import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.skylarkbuildapi.FileApi;
import com.google.devtools.build.lib.skylarkbuildapi.StructApi;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
import com.google.devtools.build.lib.syntax.SkylarkNestedSet;

/**
 * An interface for an info type that provides all compiling and linking information in the
 * transitive closure of its deps that are needed for building Objective-C rules.
 */
@SkylarkModule(
    name = "ObjcProvider",
    category = SkylarkModuleCategory.PROVIDER,
    doc = "A provider for compilation and linking of objc."
)
public interface ObjcProviderApi<FileApiT extends FileApi> extends StructApi {

  @SkylarkCallable(name = "asset_catalog",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Asset catalog resource files."
  )
  public NestedSet<FileApiT> assetCatalog();

  @SkylarkCallable(name = "bundle_file",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Files that are plopped into the final bundle at some arbitrary bundle path."
  )
  public SkylarkNestedSet bundleFile();

  @SkylarkCallable(name = "define",
      structField = true,
      doc = "A set of strings from 'defines' attributes. These are to be passed as '-D' flags to "
          + "all invocations of the compiler for this target and all depending targets."
  )
  public NestedSet<String> define();

  @SkylarkCallable(name = "dynamic_framework_dir",
      structField = true,
      doc = "Exec paths of .framework directories corresponding to dynamic frameworks to link."
  )
  public SkylarkNestedSet dynamicFrameworkDir();

  @SkylarkCallable(name = "dynamic_framework_file",
      structField = true,
      doc = "Files in .framework directories belonging to a dynamically linked framework."
  )
  public NestedSet<FileApiT> dynamicFrameworkFile();

  @SkylarkCallable(name = "debug_symbols",
      structField = true,
      doc = "Files containing information on debug symbols."
  )
  public NestedSet<FileApiT> debugSymbols();

  @SkylarkCallable(name = "debug_symbols_plist",
      structField = true,
      doc = "Files containing the plist of the debug symbols."
  )
  public NestedSet<FileApiT> debugSymbolsPlist();

  @SkylarkCallable(name = "exported_debug_artifacts",
      structField = true,
      doc = "Debug files that should be exported by the top-level target."
  )
  public NestedSet<FileApiT> exportedDebugArtifacts();

  @SkylarkCallable(name = "framework_search_path_only",
      structField = true,
      doc = "Exec paths of .framework directories corresponding to frameworks to include "
          + "in search paths, but not to link."
  )
  public SkylarkNestedSet frameworkSearchPathOnly();

  @SkylarkCallable(name = "force_load_library",
      structField = true,
      doc = "Libraries to load with -force_load."
  )
  public NestedSet<FileApiT> forceLoadLibrary();

  @SkylarkCallable(name = "header",
      structField = true,
      doc = "All header files. These may be either public or private headers."
  )
  public NestedSet<FileApiT> header();

  @SkylarkCallable(name = "imported_library",
      structField = true,
      doc = "Imported precompiled static libraries (.a files) to be linked into the binary."
  )
  public NestedSet<FileApiT> importedLibrary();

  @SkylarkCallable(name = "include",
      structField = true,
      doc = "Include search paths specified with '-I' on the command line. Also known as "
          + "header search paths (and distinct from <em>user</em> header search paths)."
  )
  public SkylarkNestedSet include();

  @SkylarkCallable(name = "include_system",
      structField = true,
      doc = "System include search paths (typically specified with -isystem)."
  )
  public SkylarkNestedSet includeSystem();

  @SkylarkCallable(name = "iquote",
      structField = true,
      doc = "User header search paths (typically specified with -iquote)."
  )
  public SkylarkNestedSet iquote();

  @SkylarkCallable(name = "j2objc_library",
      structField = true,
      doc = "Static libraries that are built from J2ObjC-translated Java code."
  )
  public NestedSet<FileApiT> j2objcLibrary();

  @SkylarkCallable(name = "jre_library",
      structField = true,
      doc = "J2ObjC JRE emulation libraries and their dependencies."
  )
  public NestedSet<FileApiT> jreLibrary();

  @SkylarkCallable(name = "library",
      structField = true,
      doc = "Library (.a) files compiled by dependencies of the current target."
  )
  public NestedSet<FileApiT> library();

  @SkylarkCallable(name = "link_inputs",
      structField = true,
      doc = "Link time artifacts from dependencies that do not fall into any other category such "
          + "as libraries or archives. This catch-all provides a way to add arbitrary data (e.g. "
          + "Swift AST files) to the linker. The rule that adds these is also responsible to "
          + "add the necessary linker flags to 'linkopt'."
  )
  public NestedSet<FileApiT> linkInputs();

  @SkylarkCallable(name = "linked_binary",
      structField = true,
      doc = "Single-architecture linked binaries to be combined for the final multi-architecture "
          + "binary."
  )
  public NestedSet<FileApiT> linkedBinary();

  @SkylarkCallable(name = "linkmap_file",
      structField = true,
      doc = "Single-architecture link map for a binary."
  )
  public NestedSet<FileApiT> linkmapFile();

  @SkylarkCallable(name = "linkopt",
      structField = true,
      doc = "Linking options."
  )
  public NestedSet<String> linkopt();

  @SkylarkCallable(name = "merge_zip",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Merge zips to include in the bundle. The entries of these zip files are included in "
          + "the final bundle with the same path. The entries in the merge zips should not include "
          + "the bundle root path (e.g. 'Foo.app')."
  )
  public NestedSet<FileApiT> mergeZip();

  @SkylarkCallable(name = "module_map",
      structField = true,
      doc = "Clang module maps, used to enforce proper use of private header files."
  )
  public NestedSet<FileApiT> moduleMap();

  @SkylarkCallable(name = "multi_arch_dynamic_libraries",
      structField = true,
      doc = "Combined-architecture dynamic libraries to include in the final bundle."
  )
  public NestedSet<FileApiT> multiArchDynamicLibraries();

  @SkylarkCallable(name = "multi_arch_linked_archives",
      structField = true,
      doc = "Combined-architecture archives to include in the final bundle."
  )
  public NestedSet<FileApiT> multiArchLinkedArchives();

  @SkylarkCallable(name = "multi_arch_linked_binaries",
      structField = true,
      doc = "Combined-architecture binaries to include in the final bundle."
  )
  public NestedSet<FileApiT> multiArchLinkedBinaries();

  @SkylarkCallable(name = "root_merge_zip",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Merge zips to include in the ipa and outside the bundle root."
  )
  public NestedSet<FileApiT> rootMergeZip();

  @SkylarkCallable(name = "sdk_dylib",
      structField = true,
      doc = "Names of SDK .dylib libraries to link with. For instance, 'libz' or 'libarchive'."
  )
  public NestedSet<String> sdkDylib();

  @SkylarkCallable(name = "sdk_framework",
      structField = true,
      doc = "Names of SDK frameworks to link with (e.g. 'AddressBook', 'QuartzCore')."
  )
  public SkylarkNestedSet sdkFramework();

  @SkylarkCallable(name = "source",
      structField = true,
      doc = "All transitive source files."
  )
  public NestedSet<FileApiT> source();

  @SkylarkCallable(name = "static_framework_file",
      structField = true,
      doc = "Files in .framework directories that should be statically included as inputs "
          + "when compiling and linking."
  )
  public NestedSet<FileApiT> staticFrameworkFile();

  @SkylarkCallable(name = "storyboard",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Files for storyboard sources."
  )
  public NestedSet<FileApiT> storyboard();

  @SkylarkCallable(name = "strings",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Files for strings source files."
  )
  public NestedSet<FileApiT> strings();

  @SkylarkCallable(name = "umbrella_header",
      structField = true,
      doc = "Clang umbrella header. Public headers are #included in umbrella headers to be "
          + "compatible with J2ObjC segmented headers."
  )
  public NestedSet<FileApiT> umbrellaHeader();

  @SkylarkCallable(name = "weak_sdk_framework",
      structField = true,
      doc = "Names of SDK frameworks to weakly link with. For instance, 'MediaAccessibility'. "
           + "In difference to regularly linked SDK frameworks, symbols from weakly linked "
           + "frameworks do not cause an error if they are not present at runtime."
  )
  public SkylarkNestedSet weakSdkFramework();

  @SkylarkCallable(name = "xcassets_dir",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "The set of all unique asset catalog directories (*.xcassets) containing files "
          + "in 'asset_catalogs'."
  )
  public SkylarkNestedSet xcassetsDir();

  @SkylarkCallable(name = "xcdatamodel",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + "Files that comprise the data models of the final linked binary."
  )
  public NestedSet<FileApiT> xcdatamodel();

  @SkylarkCallable(name = "xib",
      structField = true,
      doc = "<b>Deprecated. Resource-related fields will be migrated to another provider.</b> "
          + ".xib resource files"
  )
  public NestedSet<FileApiT> xib();

  @SkylarkCallable(
      name = "framework_dir",
      structField = true,
      doc = "Returns all unique static framework directories (directories ending in '.framework') "
          + "for all static framework files in this provider."
  )
  public SkylarkNestedSet getStaticFrameworkDirsForSkylark();
}