Class IndraSpotlessLicenserExtensionImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      IndraSpotlessLicenserExtensionImpl​(org.gradle.api.model.ObjectFactory objects, org.gradle.api.resources.TextResourceFactory textResources)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.diffplug.spotless.ThrowingEx.Supplier<java.lang.String> createHeaderSupplier​(java.lang.String name)  
      void extraConfig​(@NotNull org.gradle.api.Action<com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig> configureStep)
      Add an extra configure step to modify applied license header configurations.
      java.util.List<org.gradle.api.Action<com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig>> extraConfigSteps()  
      @NotNull org.gradle.api.provider.Property<HeaderFormat> headerFormat()
      A property containing the header format to use.
      void languageFormatOverride​(@NotNull java.lang.String language, @NotNull HeaderFormat headerFormat)
      Set a language format override for a specific formatter task.
      void languageFormatOverride​(@NotNull java.lang.String language, @NotNull org.gradle.api.Action<HeaderFormatApplier> configurer)
      Set a language format override for a specific formatter task.
      @NotNull org.gradle.api.provider.MapProperty<java.lang.String,​HeaderFormat> languageFormatOverrides()
      A property providing language-specific header format overrides.
      @NotNull org.gradle.api.provider.Property<org.gradle.api.resources.TextResource> licenseHeaderFile()
      A property holding the file to use for a license header.
      void licenseHeaderFile​(@NotNull java.lang.Object file)
      Set the license header file to use.
      @NotNull org.gradle.api.provider.Property<java.lang.Boolean> newLine()
      Get whether to append an additional newline at the end of files.
      @NotNull org.gradle.api.provider.MapProperty<java.lang.String,​java.lang.Object> properties()
      Properties to replace within license header contents.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IndraSpotlessLicenserExtensionImpl

        @Inject
        public IndraSpotlessLicenserExtensionImpl​(org.gradle.api.model.ObjectFactory objects,
                                                  org.gradle.api.resources.TextResourceFactory textResources)
    • Method Detail

      • licenseHeaderFile

        public void licenseHeaderFile​(@NotNull
                                      @NotNull java.lang.Object file)
        Description copied from interface: IndraSpotlessLicenserExtension
        Set the license header file to use.

        The contents of this file will be processed to apply a comment style and expand template parameters.

        Specified by:
        licenseHeaderFile in interface IndraSpotlessLicenserExtension
        Parameters:
        file - the file to read, via Project.file()
      • languageFormatOverride

        public void languageFormatOverride​(@NotNull
                                           @NotNull java.lang.String language,
                                           @NotNull
                                           @NotNull org.gradle.api.Action<HeaderFormatApplier> configurer)
        Description copied from interface: IndraSpotlessLicenserExtension
        Set a language format override for a specific formatter task.
        Specified by:
        languageFormatOverride in interface IndraSpotlessLicenserExtension
        Parameters:
        language - the formatter task to configure
        configurer - an action that will be passed callbacks for common header format presets
      • properties

        @NotNull
        public @NotNull org.gradle.api.provider.MapProperty<java.lang.String,​java.lang.Object> properties()
        Description copied from interface: IndraSpotlessLicenserExtension
        Properties to replace within license header contents.

        The Groovy SimpleTemplateEngine is used to pre-process license headers.

        Specified by:
        properties in interface IndraSpotlessLicenserExtension
        Returns:
        the properties map
      • extraConfig

        public void extraConfig​(@NotNull
                                @NotNull org.gradle.api.Action<com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig> configureStep)
        Description copied from interface: IndraSpotlessLicenserExtension
        Add an extra configure step to modify applied license header configurations.
        Specified by:
        extraConfig in interface IndraSpotlessLicenserExtension
        Parameters:
        configureStep - the extra configuration step
      • extraConfigSteps

        public java.util.List<org.gradle.api.Action<com.diffplug.gradle.spotless.FormatExtension.LicenseHeaderConfig>> extraConfigSteps()
      • createHeaderSupplier

        public com.diffplug.spotless.ThrowingEx.Supplier<java.lang.String> createHeaderSupplier​(java.lang.String name)