Klasse MessageFormatExtension

Object
de.sayayi.plugin.gradle.message.MessageFormatExtension

public abstract class MessageFormatExtension extends Object
Gradle extension messageFormat for configuring the messageFormatPack task.

This extension allows configuring the pack filename, compression, template validation, source sets to scan and message inclusion/exclusion filters via the nested messages block.

Seit:
0.8.0
Siehe auch:
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    MessageFormatExtension(@NotNull org.gradle.api.model.ObjectFactory objectFactory)
    Creates the extension and instantiates the nested messages extension.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    abstract org.gradle.api.provider.Property<@NotNull Boolean>
    Compress property stating whether the message pack must be compressed or not.
    Returns the nested messages extension for configuring message inclusion/exclusion filters and duplicate message handling strategy.
    abstract org.gradle.api.provider.Property<@NotNull String>
    Return the pack filename property.
    abstract org.gradle.api.file.ConfigurableFileCollection
    Returns a collection of source files to scan for message and template annotations.
    Returns the nested templates extension for configuring template validation and filtering.
    void
    messages(@NotNull org.gradle.api.Action<? super MessageFormatMessagesExtension> action)
    Configures the nested messages block.
    void
    sourceSet(org.gradle.api.tasks.SourceSet sourceSet)
    Add all outputs for the given sourceSet to the collection of sources.
    void
    templates(@NotNull org.gradle.api.Action<? super MessageFormatTemplatesExtension> action)
    Configures the nested templates block.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • MessageFormatExtension

      @Inject public MessageFormatExtension(@NotNull @NotNull org.gradle.api.model.ObjectFactory objectFactory)
      Creates the extension and instantiates the nested messages extension.
      Parameter:
      objectFactory - Gradle object factory for creating managed instances
  • Methodendetails

    • getMessages

      public MessageFormatMessagesExtension getMessages()
      Returns the nested messages extension for configuring message inclusion/exclusion filters and duplicate message handling strategy.
      Gibt zurück:
      nested messages extension, never null
      Seit:
      0.24.0
    • messages

      public void messages(@NotNull @NotNull org.gradle.api.Action<? super MessageFormatMessagesExtension> action)
      Configures the nested messages block.

      Example usage:

         messageFormat {
           messages {
             include 'xy'
             exclude 'r.*'
             duplicateStrategy = 'fail'
           }
         }
       
      Parameter:
      action - configuration action for the messages extension, not null
      Seit:
      0.24.0
    • getTemplates

      public MessageFormatTemplatesExtension getTemplates()
      Returns the nested templates extension for configuring template validation and filtering.
      Gibt zurück:
      nested templates extension, never null
      Seit:
      0.24.0
    • templates

      public void templates(@NotNull @NotNull org.gradle.api.Action<? super MessageFormatTemplatesExtension> action)
      Configures the nested templates block.

      Example usage:

         messageFormat {
           templates {
             validateReferences = true
             ignore 'tpl-.*'
           }
         }
       
      Parameter:
      action - configuration action for the templates extension, not null
      Seit:
      0.24.0
    • getPackFilename

      public abstract org.gradle.api.provider.Property<@NotNull String> getPackFilename()
      Return the pack filename property. The default value is messages.mfp.
      Gibt zurück:
      pack filename property, never null
      Seit:
      0.8.0
    • getCompress

      public abstract org.gradle.api.provider.Property<@NotNull Boolean> getCompress()
      Compress property stating whether the message pack must be compressed or not. The default value is false.
      Gibt zurück:
      compress property, never null
    • getSources

      public abstract org.gradle.api.file.ConfigurableFileCollection getSources()
      Returns a collection of source files to scan for message and template annotations.

      There's no restriction on what kind of files are in the collection. Only class (*.class) files will be used for annotation scanning.

      The default value is the output of the main/java source set, which contains all compiled java classes.

      Gibt zurück:
      class files to be scanned for messages and templates, never null
      Siehe auch:
    • sourceSet

      public void sourceSet(org.gradle.api.tasks.SourceSet sourceSet)
      Add all outputs for the given sourceSet to the collection of sources.
      Parameter:
      sourceSet - source set to include in message/template scanning
      Siehe auch: