Package de.sayayi.plugin.gradle.message
Klasse MessageFormatExtension
Object
de.sayayi.plugin.gradle.message.MessageFormatExtension
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
KonstruktorenKonstruktorBeschreibungMessageFormatExtension(@NotNull org.gradle.api.model.ObjectFactory objectFactory) Creates the extension and instantiates the nestedmessagesextension. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungabstract 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.ConfigurableFileCollectionReturns a collection of source files to scan for message and template annotations.Returns the nested templates extension for configuring template validation and filtering.voidmessages(@NotNull org.gradle.api.Action<? super MessageFormatMessagesExtension> action) Configures the nestedmessagesblock.voidsourceSet(org.gradle.api.tasks.SourceSet sourceSet) Add all outputs for the givensourceSetto the collection of sources.voidtemplates(@NotNull org.gradle.api.Action<? super MessageFormatTemplatesExtension> action) Configures the nestedtemplatesblock.
-
Konstruktordetails
-
MessageFormatExtension
@Inject public MessageFormatExtension(@NotNull @NotNull org.gradle.api.model.ObjectFactory objectFactory) Creates the extension and instantiates the nestedmessagesextension.- Parameter:
objectFactory- Gradle object factory for creating managed instances
-
-
Methodendetails
-
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 nestedmessagesblock.Example usage:
messageFormat { messages { include 'xy' exclude 'r.*' duplicateStrategy = 'fail' } }- Parameter:
action- configuration action for the messages extension, notnull- Seit:
- 0.24.0
-
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 nestedtemplatesblock.Example usage:
messageFormat { templates { validateReferences = true ignore 'tpl-.*' } }- Parameter:
action- configuration action for the templates extension, notnull- Seit:
- 0.24.0
-
getPackFilename
Return the pack filename property. The default value ismessages.mfp.- Gibt zurück:
- pack filename property, never
null - Seit:
- 0.8.0
-
getCompress
Compress property stating whether the message pack must be compressed or not. The default value isfalse.- 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/javasource 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 givensourceSetto the collection of sources.- Parameter:
sourceSet- source set to include in message/template scanning- Siehe auch:
-