Class DefaultTestExtension

java.lang.Object
io.micronaut.sourcegen.example.plugin.gradle.DefaultTestExtension
All Implemented Interfaces:
TestExtension
Direct Known Subclasses:
TestExtensionImpl

public abstract class DefaultTestExtension extends Object implements TestExtension
Default implementation of the TestExtension.
  • Field Details

    • names

      protected final Set<String> names
      A set containing all the registered task names to verify that none are duplicated.
    • project

      protected final org.gradle.api.Project project
      The project that extension is applied to.
    • classpath

      protected final org.gradle.api.artifacts.Configuration classpath
      The 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 interface TestExtension
      Parameters:
      name - The unique identifier used to derive task names
      action - The action to apply on the task specification
    • configureSpec

      protected void configureSpec(GenerateSimpleRecordSpec spec)
      Configure the defaults for the GenerateSimpleRecordSpec 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 interface TestExtension
      Parameters:
      name - The unique identifier used to derive task names
      action - The action to apply on the task specification
    • configureSpec

      protected void configureSpec(GenerateSimpleResourceSpec spec)
      Configure the defaults for the GenerateSimpleResourceSpec specification.