Class GraphqlGenerateCodeTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.graphql_java_generator.gradleplugin.GraphqlGenerateCodeTask
All Implemented Interfaces:
com.graphql_java_generator.plugin.PluginConfiguration, java.lang.Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.util.Configurable<org.gradle.api.Task>

public class GraphqlGenerateCodeTask
extends org.gradle.api.DefaultTask
implements com.graphql_java_generator.plugin.PluginConfiguration
Generates the code from the given GraphQL schema.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Task

    org.gradle.api.Task.Namer
  • Field Summary

    Fields inherited from interface com.graphql_java_generator.plugin.PluginConfiguration

    DEFAULT_COPY_RUNTIME_SOURCES, DEFAULT_GENERATE_DEPRECATED_REQUEST_RESPONSE, DEFAULT_GENERATE_JPA_ANNOTATION, DEFAULT_MODE, DEFAULT_PACKAGE_NAME, DEFAULT_SCAN_BASE_PACKAGES, DEFAULT_SCHEMA_FILE_FOLDER, DEFAULT_SCHEMA_FILE_PATTERN, DEFAULT_SCHEMA_PERSONALIZATION_FILE, DEFAULT_SEPARATE_UTIL_CLASSES, DEFAULT_SOURCE_ENCODING, DEFAULT_TARGET_SOURCE_FOLDER

    Fields inherited from interface org.gradle.api.Task

    TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
  • Constructor Summary

    Constructors 
    Constructor Description
    GraphqlGenerateCodeTask​(org.gradle.api.Project project, GraphqlExtension graphqlExtension)  
  • Method Summary

    Modifier and Type Method Description
    void execute()  
    java.util.List<com.graphql_java_generator.plugin.CustomScalarDefinition> getCustomScalars()  
    com.graphql_java_generator.plugin.Logger getLog()  
    com.graphql_java_generator.plugin.PluginMode getMode()  
    java.lang.String getPackageName()  
    com.graphql_java_generator.plugin.Packaging getPackaging()  
    java.lang.String getScanBasePackages()  
    java.io.File getSchemaFileFolder()  
    java.lang.String getSchemaFilePattern()  
    java.io.File getSchemaPersonalizationFile()  
    java.lang.String getSourceEncoding()  
    java.io.File getTargetClassFolder()  
    java.io.File getTargetSourceFolder()  
    java.util.Map<java.lang.String,​java.lang.String> getTemplates()  
    boolean isCopyRuntimeSources()  
    boolean isGenerateDeprecatedRequestResponse()  
    boolean isGenerateJPAAnnotation()  
    boolean isSeparateUtilityClasses()  

    Methods inherited from class org.gradle.api.internal.AbstractTask

    appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getRequiredServices, getServices, getSharedResources, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString, usesService

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.graphql_java_generator.plugin.PluginConfiguration

    getQuotedScanBasePackages, logConfiguration
  • Constructor Details

    • GraphqlGenerateCodeTask

      @Inject public GraphqlGenerateCodeTask​(org.gradle.api.Project project, GraphqlExtension graphqlExtension)
      Parameters:
      project - The current Gradle project
      graphqlExtension - The GraphQL extension, which contains all parameters found in the build script
  • Method Details

    • execute

      public void execute()
    • getCustomScalars

      @Input public java.util.List<com.graphql_java_generator.plugin.CustomScalarDefinition> getCustomScalars()
      Specified by:
      getCustomScalars in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getLog

      @Internal public com.graphql_java_generator.plugin.Logger getLog()
      Specified by:
      getLog in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getMode

      @Input public com.graphql_java_generator.plugin.PluginMode getMode()
      Specified by:
      getMode in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getPackageName

      @Input public java.lang.String getPackageName()
      Specified by:
      getPackageName in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getPackaging

      @Input public com.graphql_java_generator.plugin.Packaging getPackaging()
      Specified by:
      getPackaging in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getScanBasePackages

      @Input public java.lang.String getScanBasePackages()
      Specified by:
      getScanBasePackages in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getSchemaFileFolder

      @InputDirectory @Optional public java.io.File getSchemaFileFolder()
      Specified by:
      getSchemaFileFolder in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getSchemaFilePattern

      @Input public java.lang.String getSchemaFilePattern()
      Specified by:
      getSchemaFilePattern in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getSchemaPersonalizationFile

      @InputFile @Optional public java.io.File getSchemaPersonalizationFile()
      Specified by:
      getSchemaPersonalizationFile in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getSourceEncoding

      @Input public java.lang.String getSourceEncoding()
      Specified by:
      getSourceEncoding in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getTargetClassFolder

      @OutputDirectory public java.io.File getTargetClassFolder()
      Specified by:
      getTargetClassFolder in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getTargetSourceFolder

      @OutputDirectory public java.io.File getTargetSourceFolder()
      Specified by:
      getTargetSourceFolder in interface com.graphql_java_generator.plugin.PluginConfiguration
    • getTemplates

      @Input public java.util.Map<java.lang.String,​java.lang.String> getTemplates()
      Specified by:
      getTemplates in interface com.graphql_java_generator.plugin.PluginConfiguration
    • isCopyRuntimeSources

      @Input public boolean isCopyRuntimeSources()
      Specified by:
      isCopyRuntimeSources in interface com.graphql_java_generator.plugin.PluginConfiguration
    • isGenerateDeprecatedRequestResponse

      @Input public boolean isGenerateDeprecatedRequestResponse()
      Specified by:
      isGenerateDeprecatedRequestResponse in interface com.graphql_java_generator.plugin.PluginConfiguration
    • isGenerateJPAAnnotation

      @Input public boolean isGenerateJPAAnnotation()
      Specified by:
      isGenerateJPAAnnotation in interface com.graphql_java_generator.plugin.PluginConfiguration
    • isSeparateUtilityClasses

      @Input public boolean isSeparateUtilityClasses()
      Specified by:
      isSeparateUtilityClasses in interface com.graphql_java_generator.plugin.PluginConfiguration