Class MicronautExtension

java.lang.Object
io.micronaut.gradle.MicronautExtension
All Implemented Interfaces:
org.gradle.api.plugins.ExtensionAware

public abstract class MicronautExtension extends Object implements org.gradle.api.plugins.ExtensionAware
Configuration for the Micronaut extension.
Since:
1.0.0
Author:
graemerocher
  • Constructor Details

    • MicronautExtension

      @Inject public MicronautExtension(org.gradle.api.model.ObjectFactory objectFactory, SourceSetConfigurer sourceSetConfigurer)
  • Method Details

    • getImportMicronautPlatform

      public abstract org.gradle.api.provider.Property<Boolean> getImportMicronautPlatform()
      If set to false, then the Micronaut Gradle plugins will not automatically add the Micronaut Platform BOM to your dependencies. It becomes your responsibility to add it directly, or to provide explicit versions for Micronaut modules.
      Returns:
      the import platform flag. Defaults to true.
    • getIgnoredAutomaticDependencies

      public abstract org.gradle.api.provider.SetProperty<String> getIgnoredAutomaticDependencies()
      The Micronaut plugins can automatically add dependencies to your project. If, for some reason, a dependency shouldn't be automatically added, you can add its coordinates to this set. The format is "group:name". It must not include the version.
      Returns:
      the set of ignored automatic dependencies, as group:name strings.
    • getTestRuntime

      public org.gradle.api.provider.Property<MicronautTestRuntime> getTestRuntime()
      Returns:
      The test runtime to use.
    • getRuntime

      public org.gradle.api.provider.Property<MicronautRuntime> getRuntime()
      Returns:
      The packaging type to use for the micronaut application.
    • getEnableNativeImage

      public org.gradle.api.provider.Property<Boolean> getEnableNativeImage()
      Whether native image is enabled
      Returns:
      True if it is
    • enableNativeImage

      public MicronautExtension enableNativeImage(boolean b)
      Sets whether native image is enabled.
      Parameters:
      b - Whether native image is enabled.
      Returns:
      This extension
    • version

      public MicronautExtension version(String version)
      Configures the Micronaut version.
      Parameters:
      version - The micronaut version
      Returns:
      This extension
    • runtime

      public MicronautExtension runtime(String runtime)
      Configures the packaging type.
      Parameters:
      runtime - The micronaut packaging type
      Returns:
      This extension
    • runtime

      public MicronautExtension runtime(MicronautRuntime micronautRuntime)
      Configures the packaging type.
      Parameters:
      micronautRuntime - The micronaut runtime type
      Returns:
      This extension
    • testRuntime

      public MicronautExtension testRuntime(String runtime)
      Configures the test runtime to use.
      Parameters:
      runtime - The micronaut packaging type
      Returns:
      This extension
    • testRuntime

      public MicronautExtension testRuntime(MicronautTestRuntime testRuntime)
      Configures the test runtime to use.
      Parameters:
      testRuntime - The micronaut runtime type
      Returns:
      This extension
    • getVersion

      public org.gradle.api.provider.Property<String> getVersion()
      Returns:
      The micronaut version.
    • getProcessing

      public AnnotationProcessing getProcessing()
    • processing

      public MicronautExtension processing(org.gradle.api.Action<AnnotationProcessing> processingAction)
      Allows configuring processing.
      Parameters:
      processingAction - The processing action
      Returns:
      This extension