Package io.micronaut.gradle
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 Summary
ConstructorDescriptionMicronautExtension
(org.gradle.api.model.ObjectFactory objectFactory, SourceSetConfigurer sourceSetConfigurer) -
Method Summary
Modifier and TypeMethodDescriptionenableNativeImage
(boolean b) Sets whether native image is enabled.org.gradle.api.provider.Property<Boolean>
Whether native image is enabledabstract org.gradle.api.provider.SetProperty<String>
The Micronaut plugins can automatically add dependencies to your project.abstract org.gradle.api.provider.Property<Boolean>
If set to false, then the Micronaut Gradle plugins will not automatically add the Micronaut Platform BOM to your dependencies.org.gradle.api.provider.Property<MicronautRuntime>
org.gradle.api.provider.Property<MicronautTestRuntime>
org.gradle.api.provider.Property<String>
processing
(org.gradle.api.Action<AnnotationProcessing> processingAction) Allows configuring processing.runtime
(MicronautRuntime micronautRuntime) Configures the packaging type.Configures the packaging type.testRuntime
(MicronautTestRuntime testRuntime) Configures the test runtime to use.testRuntime
(String runtime) Configures the test runtime to use.Configures the Micronaut version.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gradle.api.plugins.ExtensionAware
getExtensions
-
Constructor Details
-
MicronautExtension
@Inject public MicronautExtension(org.gradle.api.model.ObjectFactory objectFactory, SourceSetConfigurer sourceSetConfigurer)
-
-
Method Details
-
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
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
- Returns:
- The test runtime to use.
-
getRuntime
- Returns:
- The packaging type to use for the micronaut application.
-
getEnableNativeImage
Whether native image is enabled- Returns:
- True if it is
-
enableNativeImage
Sets whether native image is enabled.- Parameters:
b
- Whether native image is enabled.- Returns:
- This extension
-
version
Configures the Micronaut version.- Parameters:
version
- The micronaut version- Returns:
- This extension
-
runtime
Configures the packaging type.- Parameters:
runtime
- The micronaut packaging type- Returns:
- This extension
-
runtime
Configures the packaging type.- Parameters:
micronautRuntime
- The micronaut runtime type- Returns:
- This extension
-
testRuntime
Configures the test runtime to use.- Parameters:
runtime
- The micronaut packaging type- Returns:
- This extension
-
testRuntime
Configures the test runtime to use.- Parameters:
testRuntime
- The micronaut runtime type- Returns:
- This extension
-
getVersion
- Returns:
- The micronaut version.
-
getProcessing
-
processing
Allows configuring processing.- Parameters:
processingAction
- The processing action- Returns:
- This extension
-