Package de.sayayi.plugin.gradle.message
Klasse MessageFormatMessagesExtension
Object
de.sayayi.plugin.gradle.message.MessageFormatMessagesExtension
Nested extension for configuring message inclusion/exclusion filters and duplicate message handling strategy.
This extension is accessible via the messages block inside the messageFormat extension:
messageFormat {
messages {
include 'xy'
exclude 'r.*'
duplicateStrategy = 'fail'
}
}
- Seit:
- 0.24.0
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidExclude messages that match the given regular expressions.abstract org.gradle.api.provider.Property<@NotNull Object> Property containing the strategy to use in case a duplicate message code or template name (with different message definition) is found.Return a list of regular expressions which will be matched against each message code.Return a list of regular expressions which will be matched against each message code.voidInclude messages that match the given regular expressions.
-
Konstruktordetails
-
MessageFormatMessagesExtension
public MessageFormatMessagesExtension()
-
-
Methodendetails
-
getIncludeRegexFilters
Return a list of regular expressions which will be matched against each message code. If it matches, the message will be included in the packed message file. If it doesn't match the message is skipped.If the list is empty, all messages are included, unless they're explicitly excluded.
- Gibt zurück:
- list of regular expressions for message inclusion, never
null - Siehe auch:
-
getExcludeRegexFilters
Return a list of regular expressions which will be matched against each message code. If it matches, the message will be excluded from the packed message file. If it doesn't match the message is included.- Gibt zurück:
- list of regular expressions for message exclusion, never
null - Siehe auch:
-
getDuplicateStrategy
Property containing the strategy to use in case a duplicate message code or template name (with different message definition) is found. The default strategy isIGNORE_AND_WARN.This property accepts various formats:
-
DuplicateStrategyenum value (e.g.FAIL) -
Duplicate strategy string. The string is converted to uppercase, dashes are translated to underscores and the
resulting strategy name is matched against
DuplicateStrategy(e.g.'override-and-warn'matchesOVERRIDE_AND_WARN)
A duplicate is either a message with an already known message code or a template with an already known template name and a different message definition. This means that if the same message or template is encountered twice, it is not considered a duplicate.
- Gibt zurück:
- duplicate message strategy property, never
null - Siehe auch:
-
-
include
Include messages that match the given regular expressions.- Parameter:
regex- array of regular expressions, notnull- Siehe auch:
-
exclude
Exclude messages that match the given regular expressions.- Parameter:
regex- array of regular expressions, notnull- Siehe auch:
-