Class GenerateGraphQLSchemaTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.graphql_java_generator.gradleplugin.GenerateGraphQLSchemaTask
- All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration,com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration,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 GenerateGraphQLSchemaTask
extends org.gradle.api.DefaultTask
implements com.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
Generates the code from the given GraphQL schema.
-
Nested Class Summary
-
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 -
Constructor Summary
Constructors Constructor Description GenerateGraphQLSchemaTask(org.gradle.api.Project project, GenerateGraphQLSchemaExtension generateGraphQLSchemaExtension) -
Method Summary
Modifier and Type Method Description voidexecute()java.lang.StringgetDefaultTargetSchemaFileName()com.graphql_java_generator.plugin.conf.LoggergetPluginLogger()java.io.FilegetProjectDir()java.lang.StringgetResourceEncoding()java.io.FilegetSchemaFileFolder()java.lang.StringgetSchemaFilePattern()java.io.FilegetTargetFolder()java.lang.StringgetTargetSchemaFileName()java.util.Map<java.lang.String,java.lang.String>getTemplates()booleanisAddRelayConnections()booleanisSkipGenerationIfSchemaHasNotChanged()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, usesServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
GenerateGraphQLSchemaTask
@Inject public GenerateGraphQLSchemaTask(org.gradle.api.Project project, GenerateGraphQLSchemaExtension generateGraphQLSchemaExtension)- Parameters:
project- The current Gradle projectgenerateGraphQLSchemaExtension- 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
-
getDefaultTargetSchemaFileName
@Internal public java.lang.String getDefaultTargetSchemaFileName()- Specified by:
getDefaultTargetSchemaFileNamein interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getPluginLogger
@Internal public com.graphql_java_generator.plugin.conf.Logger getPluginLogger()- Specified by:
getPluginLoggerin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getProjectDir
@Internal public java.io.File getProjectDir()- Specified by:
getProjectDirin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getResourceEncoding
@Input public java.lang.String getResourceEncoding()- Specified by:
getResourceEncodingin interfacecom.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
-
getSchemaFileFolder
@InputDirectory @Optional public java.io.File getSchemaFileFolder()- Specified by:
getSchemaFileFolderin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getSchemaFilePattern
@Input public java.lang.String getSchemaFilePattern()- Specified by:
getSchemaFilePatternin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getTargetFolder
@InputDirectory public java.io.File getTargetFolder()- Specified by:
getTargetFolderin interfacecom.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
-
getTargetSchemaFileName
@Input public java.lang.String getTargetSchemaFileName()- Specified by:
getTargetSchemaFileNamein interfacecom.graphql_java_generator.plugin.conf.GenerateGraphQLSchemaConfiguration
-
getTemplates
@Input public java.util.Map<java.lang.String,java.lang.String> getTemplates()- Specified by:
getTemplatesin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
isAddRelayConnections
@Input public boolean isAddRelayConnections()- Specified by:
isAddRelayConnectionsin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
isSkipGenerationIfSchemaHasNotChanged
@Input public boolean isSkipGenerationIfSchemaHasNotChanged()- Specified by:
isSkipGenerationIfSchemaHasNotChangedin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-