Class DefaultTestExtension
java.lang.Object
io.micronaut.sourcegen.example.plugin.gradle.DefaultTestExtension
- All Implemented Interfaces:
TestExtension
- Direct Known Subclasses:
TestExtensionImpl
Default implementation of the
TestExtension
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
The configurator for Test task.protected static class
The configurator for Test task. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.gradle.api.artifacts.Configuration
The classpath used for running the tasks.A set containing all the registered task names to verify that none are duplicated.protected final org.gradle.api.Project
The project that extension is applied to. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTestExtension
(org.gradle.api.Project project, org.gradle.api.artifacts.Configuration classpath) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Configure the defaults for theGenerateSimpleRecordSpec
specification.protected void
Configure the defaults for theGenerateSimpleResourceSpec
specification.void
generateSimpleRecord
(String name, org.gradle.api.Action<? super GenerateSimpleRecordSpec> action) Create a task for generateSimpleRecord.void
generateSimpleResource
(String name, org.gradle.api.Action<? super GenerateSimpleResourceSpec> action) Create a task for generateSimpleResource.
-
Field Details
-
names
A set containing all the registered task names to verify that none are duplicated. -
project
protected final org.gradle.api.Project projectThe project that extension is applied to. -
classpath
protected final org.gradle.api.artifacts.Configuration classpathThe classpath used for running the tasks.
-
-
Constructor Details
-
DefaultTestExtension
@Inject public DefaultTestExtension(org.gradle.api.Project project, org.gradle.api.artifacts.Configuration classpath)
-
-
Method Details
-
generateSimpleRecord
public void generateSimpleRecord(String name, org.gradle.api.Action<? super GenerateSimpleRecordSpec> action) Description copied from interface:TestExtension
Create a task for generateSimpleRecord. Generate a simple record in the supplied package and with the specified version. This javadoc will be copied to the respected plugin implementations.- Specified by:
generateSimpleRecord
in interfaceTestExtension
- Parameters:
name
- The unique identifier used to derive task namesaction
- The action to apply on the task specification
-
configureSpec
Configure the defaults for theGenerateSimpleRecordSpec
specification. -
generateSimpleResource
public void generateSimpleResource(String name, org.gradle.api.Action<? super GenerateSimpleResourceSpec> action) Description copied from interface:TestExtension
Create a task for generateSimpleResource. Generate a simple record in the supplied package and with the specified version. This javadoc will be copied to the respected plugin implementations.- Specified by:
generateSimpleResource
in interfaceTestExtension
- Parameters:
name
- The unique identifier used to derive task namesaction
- The action to apply on the task specification
-
configureSpec
Configure the defaults for theGenerateSimpleResourceSpec
specification.
-