Klasse MessageFormatMessagesExtension

Object
de.sayayi.plugin.gradle.message.MessageFormatMessagesExtension

public abstract class MessageFormatMessagesExtension extends Object
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:
  • Konstruktordetails

    • MessageFormatMessagesExtension

      public MessageFormatMessagesExtension()
  • Methodendetails

    • getIncludeRegexFilters

      @Input public List<String> 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

      @Input public List<String> 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

      @Input public abstract org.gradle.api.provider.Property<@NotNull Object> 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 is IGNORE_AND_WARN.

      This property accepts various formats:

      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

      public void include(String... regex)
      Include messages that match the given regular expressions.
      Parameter:
      regex - array of regular expressions, not null
      Siehe auch:
    • exclude

      public void exclude(String... regex)
      Exclude messages that match the given regular expressions.
      Parameter:
      regex - array of regular expressions, not null
      Siehe auch: