Klasse MessageFormatTemplatesExtension

Object
de.sayayi.plugin.gradle.message.MessageFormatTemplatesExtension

public abstract class MessageFormatTemplatesExtension extends Object
Nested extension for configuring template validation and filtering.

This extension is accessible via the templates block inside the messageFormat extension:

   messageFormat {
     templates {
       validateReferences = true
       ignore 'tpl-.*'
     }
   }
 
Seit:
0.24.0
Siehe auch:
  • Konstruktordetails

    • MessageFormatTemplatesExtension

      public MessageFormatTemplatesExtension()
  • Methodendetails

    • getIgnoreRegexFilters

      @Input public List<String> getIgnoreRegexFilters()
      Return a list of regular expressions which will be matched against each template name. If it matches, the template will be ignored during validation of referenced templates.
      Gibt zurück:
      list of regular expressions for template name filtering, never null
      Siehe auch:
    • getValidateReferences

      @Input public abstract org.gradle.api.provider.Property<@NotNull Boolean> getValidateReferences()
      Property containing a boolean stating whether to validate referenced templates. The default value resolves to true.

      If the property resolves to true the task will check whether all referenced templates (including nested templates) are available and included in the packed message file.

      If the property resolves to false no checks are performed. This may lead to a situation where a message cannot be formatted if the referenced template is missing from the message support.

      Gibt zurück:
      validate referenced templates property, never null
    • ignore

      public void ignore(String... regex)
      Ignore templates whose name matches the given regular expressions during template validation.
      Parameter:
      regex - array of regular expressions matching template names, not null
      Siehe auch: