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 classThe configurator for Test task.protected static classThe configurator for Test task. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.gradle.api.artifacts.ConfigurationThe 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.ProjectThe 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 voidConfigure the defaults for theGenerateSimpleRecordSpecspecification.protected voidConfigure the defaults for theGenerateSimpleResourceSpecspecification.voidgenerateSimpleRecord(String name, org.gradle.api.Action<? super GenerateSimpleRecordSpec> action) Create a task for generateSimpleRecord.voidgenerateSimpleResource(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:TestExtensionCreate 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:
generateSimpleRecordin interfaceTestExtension- Parameters:
name- The unique identifier used to derive task namesaction- The action to apply on the task specification
-
configureSpec
Configure the defaults for theGenerateSimpleRecordSpecspecification. -
generateSimpleResource
public void generateSimpleResource(String name, org.gradle.api.Action<? super GenerateSimpleResourceSpec> action) Description copied from interface:TestExtensionCreate 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:
generateSimpleResourcein interfaceTestExtension- Parameters:
name- The unique identifier used to derive task namesaction- The action to apply on the task specification
-
configureSpec
Configure the defaults for theGenerateSimpleResourceSpecspecification.
-