Annotation Type Hint
What a build hint attribute is, beyond what its Java signature already says.
The attribute's type, its name and its enum's constants are the compiler's business and are not restated here. This carries only what javac cannot infer: the wire key when it differs from the attribute name, the prose the developer guide and the Settings editor show, and the handful of facts about how the builders read the value.
The annotation's own default clause is deliberately NOT the build server's
default, and nothing here records that either. A hint is written only where
the developer set it, so the clause has no meaning at runtime -- see
HintUnset for what the default clause does say.
ANNOTATION_TYPE rather than TYPE. This describes a build hint annotation or
one of its members, and both are annotation declarations. Allowing TYPE let
@Hint(name = "ios.pods") be written straight onto an application class,
where it compiles, sets nothing, and reports nothing -- which is the exact
silence these annotations exist to remove.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe hint this one is a deprecated second spelling of.booleanWhether a cn1lib may append to this hint rather than replace it.Why this hint is deprecated, and what to use instead.booleanAvailable only to enterprise accounts.booleanDocumented here but read only by the build service, so nothing in this repository consumes it.What kind of string this is, when the attribute's Java type does not say.Further reading, for the guide's table.The key this attribute writes, when it is not the group's prefix followed by the attribute name.The platform this hint applies to, for the guide's table.What a list's values are joined with on the wire.A regular expression the value must match, or "" for no check.
-
Element Details
-
name
String nameThe key this attribute writes, when it is not the group's prefix followed by the attribute name.
android.min_sdk_versionis notminSdkVersion, and the builders are the authority on the spelling.- Default:
""
-
valuePattern
String valuePatternA regular expression the value must match, or "" for no check.
For the hints whose type cannot express their shape.
Stringsays nothing aboutios.interface_orientation, whose value is a colon separated list of four known constants -- and a misspelled one does not fail, it just fails to match, so the builder keeps every orientation and the app ships rotating in directions it was told not to.Checked by the annotation processor against the value that is about to be written, so it fails the build that declared it rather than the device that runs it.
java.util.regexsyntax, anchored implicitly: the WHOLE value must match.- Default:
""
-
kind
HintKind kindWhat kind of string this is, when the attribute's Java type does not say.
The editor picks its control from this: a version field, a masked field for a secret, a multi-line box for an XML fragment.
- Default:
DEFAULT
-
appendable
boolean appendableWhether a cn1lib may append to this hint rather than replace it.
Separate from
separator()because the delimiter can legitimately be empty: the XML fragment family --android.xpermissionsand friends -- is appended to with nothing between the pieces, which is not the same as a hint no library can contribute to.- Default:
false
-
separator
String separatorWhat a list's values are joined with on the wire.
A cn1lib appends onto the same key, so this has to match what the builder splits on --
ios.podsis comma delimited andios.add_libssemicolon delimited.- Default:
""
-
platform
String platformThe platform this hint applies to, for the guide's table.
On the annotation TYPE this is the default for every attribute in it, which is where it belongs: every hint in
@Androidis an Android hint, and saying so on each of the twenty-four was noise that could also be got wrong. An attribute states it only to disagree --@OnDeviceDebugspans two platforms and each of its attributes says which.- Default:
""
-
aliasOf
String aliasOfThe hint this one is a deprecated second spelling of.
Both names denote ONE effective setting -- the builder reads
android.captureRecordand then letsand.captureRecordoverride it -- so conflict detection has to collapse them.- Default:
""
-
deprecated
-
external
boolean externalDocumented here but read only by the build service, so nothing in this repository consumes it.- Default:
false
-
enterpriseOnly
boolean enterpriseOnlyAvailable only to enterprise accounts.- Default:
false
-
link
-