Class TestExtensionImpl

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

public abstract class TestExtensionImpl extends DefaultTestExtension
This extends a generated class to modify some behavior.
  • Constructor Details

    • TestExtensionImpl

      public TestExtensionImpl(org.gradle.api.Project project, org.gradle.api.artifacts.Configuration classpath)
  • Method Details

    • generateRecordWithName

      public void generateRecordWithName(String typeName, String packageName, org.gradle.api.Action<GenerateSimpleRecordSpec> action)
      This is an example of how you can add a utility method to the generated extension. Inside it calls the generated method.
      Parameters:
      typeName - The type name
      packageName - The package name
      action - The spec action
    • generateResource

      public void generateResource(String name, String fileName, String content)
      This is another example of a utility method.
      Parameters:
      name - The task name
      fileName - The file name
      content - The content