Class GenerateServerCodeTask

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.graphql_java_generator.gradleplugin.GenerateServerCodeTask
All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration, com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration, 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 GenerateServerCodeTask
extends org.gradle.api.DefaultTask
implements com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
  • 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.conf.CommonConfiguration

    DEFAULT_ADD_RELAY_CONNECTIONS, DEFAULT_PACKAGE_NAME, DEFAULT_SCHEMA_FILE_FOLDER, DEFAULT_SCHEMA_FILE_PATTERN, DEFAULT_SKIP_GENERATION_IF_SCHEMA_HAS_NOT_CHANGED

    Fields inherited from interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration

    DEFAULT_COPY_RUNTIME_SOURCES, DEFAULT_SOURCE_ENCODING, DEFAULT_TARGET_RESOURCE_FOLDER, DEFAULT_TARGET_SOURCE_FOLDER

    Fields inherited from interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration

    DEFAULT_GENERATE_BATCH_LOADER_ENVIRONMENT, DEFAULT_GENERATE_JPA_ANNOTATION, DEFAULT_JAVA_TYPE_FOR_ID_TYPE, DEFAULT_SCAN_BASE_PACKAGES, DEFAULT_SCHEMA_PERSONALIZATION_FILE, DEFAULT_SEPARATE_UTIL_CLASSES

    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
    GenerateServerCodeTask​(org.gradle.api.Project project, GenerateServerCodeExtension generateServerCodeExtension)  
  • Method Summary

    Modifier and Type Method Description
    void execute()  
    java.util.List<com.graphql_java_generator.plugin.conf.CustomScalarDefinition> getCustomScalars()  
    java.lang.String getJavaTypeForIDType()  
    com.graphql_java_generator.plugin.conf.PluginMode getMode()  
    java.lang.String getPackageName()  
    com.graphql_java_generator.plugin.conf.Packaging getPackaging()  
    com.graphql_java_generator.plugin.conf.Logger getPluginLogger()  
    java.lang.String getQuotedScanBasePackages()  
    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 getTargetResourceFolder()  
    java.io.File getTargetSourceFolder()  
    java.util.Map<java.lang.String,​java.lang.String> getTemplates()  
    boolean isAddRelayConnections()  
    boolean isCopyRuntimeSources()  
    boolean isGenerateBatchLoaderEnvironment()  
    boolean isGenerateJPAAnnotation()  
    boolean isSeparateUtilityClasses()  
    boolean isSkipGenerationIfSchemaHasNotChanged()  

    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.conf.CommonConfiguration

    getDefaultTargetSchemaFileName, logCommonConfiguration

    Methods inherited from interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration

    logGenerateCodeCommonConfiguration

    Methods inherited from interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration

    logConfiguration, logGenerateServerCodeConfiguration
  • Constructor Details

    • GenerateServerCodeTask

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

    • execute

      public void execute() throws java.io.IOException
      Throws:
      java.io.IOException
    • getCustomScalars

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

      @Input public java.lang.String getJavaTypeForIDType()
      Specified by:
      getJavaTypeForIDType in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • getPluginLogger

      @Internal public com.graphql_java_generator.plugin.conf.Logger getPluginLogger()
      Specified by:
      getPluginLogger in interface com.graphql_java_generator.plugin.conf.CommonConfiguration
    • getMode

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

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

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

      @Input public java.lang.String getScanBasePackages()
      Specified by:
      getScanBasePackages in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • getQuotedScanBasePackages

      @Internal public java.lang.String getQuotedScanBasePackages()
      Specified by:
      getQuotedScanBasePackages in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • getSchemaFileFolder

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

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

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

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

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

      @OutputDirectory public java.io.File getTargetSourceFolder()
      Specified by:
      getTargetSourceFolder in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • getTargetResourceFolder

      @OutputDirectory public java.io.File getTargetResourceFolder()
      Specified by:
      getTargetResourceFolder in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • getTemplates

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

      @Input public boolean isAddRelayConnections()
      Specified by:
      isAddRelayConnections in interface com.graphql_java_generator.plugin.conf.CommonConfiguration
    • isCopyRuntimeSources

      @Input public boolean isCopyRuntimeSources()
      Specified by:
      isCopyRuntimeSources in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • isGenerateBatchLoaderEnvironment

      @Input public boolean isGenerateBatchLoaderEnvironment()
      Specified by:
      isGenerateBatchLoaderEnvironment in interface com.graphql_java_generator.plugin.conf.GenerateServerCodeConfiguration
    • isGenerateJPAAnnotation

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

      @Input public boolean isSeparateUtilityClasses()
      Specified by:
      isSeparateUtilityClasses in interface com.graphql_java_generator.plugin.conf.GenerateCodeCommonConfiguration
    • isSkipGenerationIfSchemaHasNotChanged

      @Input public boolean isSkipGenerationIfSchemaHasNotChanged()
      Specified by:
      isSkipGenerationIfSchemaHasNotChanged in interface com.graphql_java_generator.plugin.conf.CommonConfiguration