Class GenerateJsonSchema
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- org.creekservice.api.json.schema.gradle.plugin.task.GenerateJsonSchema
-
- All Implemented Interfaces:
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 abstract class GenerateJsonSchema extends org.gradle.api.DefaultTaskTask for generating JSON schemas from code
-
-
Constructor Summary
Constructors Constructor Description GenerateJsonSchema()Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.gradle.api.file.ConfigurableFileCollectiongetClassFiles()abstract org.gradle.api.provider.ListProperty<java.lang.String>getExtraArguments()abstract org.gradle.api.file.ConfigurableFileCollectiongetGeneratorDeps()abstract org.gradle.api.provider.Property<java.lang.String>getOutputDirectoryName()The name of the directory under theresource rootwhere the schema will be written.abstract org.gradle.api.file.ConfigurableFileCollectiongetProjectDeps()abstract org.gradle.api.file.DirectoryPropertygetSchemaResourceRoot()The resource root where generated schemas should be storedabstract org.gradle.api.provider.ListProperty<java.lang.String>getSubtypeScanningModuleWhiteList()An optional list of module name used to limit the search for subtypes to only those types under the supplied module.abstract org.gradle.api.provider.ListProperty<java.lang.String>getSubtypeScanningPackageWhiteList()An optional list of package name used to limit the search for subtypes to only those types under the supplied packages.abstract org.gradle.api.provider.ListProperty<java.lang.String>getTypeScanningModuleWhiteList()An optional list of module names used to limit the generation of schemas to only those@GeneratesSchemaannotated types within the named modules.abstract org.gradle.api.provider.ListProperty<java.lang.String>getTypeScanningPackageWhiteList()An optional list of package name used to limit the generation of schemas to only those@GeneratesSchemaannotated types under the supplied packages.voidrun()The task action.voidsetExtraArgumentsFromOption(java.util.List<java.lang.String> args)Method to allow setting extra arguments from the command line.voidsetSubtypePackageWhiteListFromOption(java.util.List<java.lang.String> args)Method to allow setting allowed subtype packages from the command line.voidsetSubtypeScanningModuleWhiteListFromOption(java.util.List<java.lang.String> args)Method to allow setting allowed subtype modules from the command line.voidsetTypeScanningModuleWhiteListFromOption(java.util.List<java.lang.String> args)Method to allow setting allowed subtype packages from the command line.voidsetTypeScanningPackageWhiteListFromOption(java.util.List<java.lang.String> args)Method to allow setting allowed subtype packages from the command line.-
Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
-
-
-
-
Method Detail
-
getTypeScanningModuleWhiteList
@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getTypeScanningModuleWhiteList()
An optional list of module names used to limit the generation of schemas to only those@GeneratesSchemaannotated types within the named modules.Allowed module names can include the glob wildcard
*character.Setting this will speed up schema generation.
Default: empty, meaning all modules.
- Returns:
- type scanning module white list property.
-
setTypeScanningModuleWhiteListFromOption
public void setTypeScanningModuleWhiteListFromOption(java.util.List<java.lang.String> args)
Method to allow setting allowed subtype packages from the command line.- Parameters:
args- the modules to whitelist
-
getTypeScanningPackageWhiteList
@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getTypeScanningPackageWhiteList()
An optional list of package name used to limit the generation of schemas to only those@GeneratesSchemaannotated types under the supplied packages.Allowed package names can include the glob wildcard
*character.Setting this will speed up schema generation.
Default: empty, meaning all packages.
- Returns:
- type scanning packaging white list property.
-
setTypeScanningPackageWhiteListFromOption
public void setTypeScanningPackageWhiteListFromOption(java.util.List<java.lang.String> args)
Method to allow setting allowed subtype packages from the command line.- Parameters:
args- the packages to whitelist
-
getSubtypeScanningModuleWhiteList
@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getSubtypeScanningModuleWhiteList()
An optional list of module name used to limit the search for subtypes to only those types under the supplied module.Allowed module names can include the glob wildcard
*character.Setting this will speed up schema generation.
Default: empty, meaning all modules.
- Returns:
- subtype scanning module white list property.
-
setSubtypeScanningModuleWhiteListFromOption
public void setSubtypeScanningModuleWhiteListFromOption(java.util.List<java.lang.String> args)
Method to allow setting allowed subtype modules from the command line.- Parameters:
args- the modules to whitelist
-
getSubtypeScanningPackageWhiteList
@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getSubtypeScanningPackageWhiteList()
An optional list of package name used to limit the search for subtypes to only those types under the supplied packages.Allowed package names can include the glob wildcard
*character.Setting this will speed up schema generation.
Default: empty, meaning all packages.
- Returns:
- subtype scanning package white list property.
-
setSubtypePackageWhiteListFromOption
public void setSubtypePackageWhiteListFromOption(java.util.List<java.lang.String> args)
Method to allow setting allowed subtype packages from the command line.- Parameters:
args- the packages to whitelist
-
getSchemaResourceRoot
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getSchemaResourceRoot()
The resource root where generated schemas should be storedDefault: $buildDir/generated/resources/schema
- Returns:
- the resource root property
-
getOutputDirectoryName
@Input public abstract org.gradle.api.provider.Property<java.lang.String> getOutputDirectoryName()
The name of the directory under theresource rootwhere the schema will be written.This corresponds to the directory under which schema files will be located within the compiled jar file.
- Returns:
- output directory property.
-
getExtraArguments
@Input public abstract org.gradle.api.provider.ListProperty<java.lang.String> getExtraArguments()
- Returns:
- additional command line arguments to pass to the generator
-
setExtraArgumentsFromOption
public void setExtraArgumentsFromOption(java.util.List<java.lang.String> args)
Method to allow setting extra arguments from the command line.- Parameters:
args- the extra arguments to set.
-
getClassFiles
@InputFiles public abstract org.gradle.api.file.ConfigurableFileCollection getClassFiles()
- Returns:
- the class files to scan, e.g. the output of the compileJava task or other compile task.
-
getGeneratorDeps
@Internal public abstract org.gradle.api.file.ConfigurableFileCollection getGeneratorDeps()
- Returns:
- dependencies of the system test runner.
-
getProjectDeps
@Internal public abstract org.gradle.api.file.ConfigurableFileCollection getProjectDeps()
- Returns:
- dependencies the project needs to compile.
-
run
public void run()
The task action.
-
-