Class CommonExtension
java.lang.Object
com.graphql_java_generator.gradleplugin.CommonExtension
- All Implemented Interfaces:
com.graphql_java_generator.plugin.conf.CommonConfiguration
- Direct Known Subclasses:
GenerateCodeCommonExtension,GenerateGraphQLSchemaExtension
public class CommonExtension
extends java.lang.Object
implements com.graphql_java_generator.plugin.conf.CommonConfiguration
This class contain the parameters that are common to all Gradle Extensions for this plugin, that is the parameters that are common to all the tasks of this plugin. The extensions are used here to define the default values for the task parameters
This avoids to redeclare each common parameter in each Extension, including its comment. When a comment is updated, only one update is necessary, instead of updating it in each Extension.
-
Field Summary
Fields Modifier and Type Field Description protected org.gradle.api.ProjectprojectbooleanskipGenerationIfSchemaHasNotChanged -
Constructor Summary
Constructors Constructor Description CommonExtension(org.gradle.api.Project project) -
Method Summary
Modifier and Type Method Description java.lang.IntegergetMaxTokens()java.io.FilegetProjectDir()java.io.FilegetSchemaFileFolder()java.lang.StringgetSchemaFilePattern()java.util.Map<java.lang.String,java.lang.String>getTemplates()booleanisAddRelayConnections()booleanisInitialized()booleanisSkipGenerationIfSchemaHasNotChanged()Deprecated.voidlogConfiguration()voidsetAddRelayConnections(boolean addRelayConnections)voidsetInitialized(boolean initialized)voidsetMaxTokens(java.lang.Integer maxTokens)voidsetSchemaFileFolder(java.lang.String schemaFileFolder)voidsetSchemaFilePattern(java.lang.String schemaFilePattern)voidsetSkipGenerationIfSchemaHasNotChanged(boolean skipGenerationIfSchemaHasNotChanged)voidsetTemplates(java.util.Map<java.lang.String,java.lang.String> templates)
-
Field Details
-
project
protected final org.gradle.api.Project project -
skipGenerationIfSchemaHasNotChanged
public boolean skipGenerationIfSchemaHasNotChanged
-
-
Constructor Details
-
CommonExtension
public CommonExtension(org.gradle.api.Project project)
-
-
Method Details
-
isInitialized
public boolean isInitialized() -
setInitialized
public void setInitialized(boolean initialized) -
getMaxTokens
public java.lang.Integer getMaxTokens()- Specified by:
getMaxTokensin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setMaxTokens
public void setMaxTokens(java.lang.Integer maxTokens) -
getProjectDir
public java.io.File getProjectDir()- Specified by:
getProjectDirin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
getSchemaFileFolder
public java.io.File getSchemaFileFolder()- Specified by:
getSchemaFileFolderin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSchemaFileFolder
public final void setSchemaFileFolder(java.lang.String schemaFileFolder) -
getSchemaFilePattern
public java.lang.String getSchemaFilePattern()- Specified by:
getSchemaFilePatternin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSchemaFilePattern
public final void setSchemaFilePattern(java.lang.String schemaFilePattern) -
getTemplates
public java.util.Map<java.lang.String,java.lang.String> getTemplates()- Specified by:
getTemplatesin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setTemplates
public final void setTemplates(java.util.Map<java.lang.String,java.lang.String> templates) -
isAddRelayConnections
public boolean isAddRelayConnections()- Specified by:
isAddRelayConnectionsin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setAddRelayConnections
public final void setAddRelayConnections(boolean addRelayConnections) -
isSkipGenerationIfSchemaHasNotChanged
@Deprecated public boolean isSkipGenerationIfSchemaHasNotChanged()Deprecated.- Specified by:
isSkipGenerationIfSchemaHasNotChangedin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-
setSkipGenerationIfSchemaHasNotChanged
public final void setSkipGenerationIfSchemaHasNotChanged(boolean skipGenerationIfSchemaHasNotChanged) -
logConfiguration
public void logConfiguration()- Specified by:
logConfigurationin interfacecom.graphql_java_generator.plugin.conf.CommonConfiguration
-