Class GrammarFilesTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.github.treesitter.ktreesitter.plugin.GrammarFilesTask
- All Implemented Interfaces:
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>
@NonNullApi
@CacheableTask
public abstract class GrammarFilesTask
extends org.gradle.api.DefaultTask
The task that generates the source files for the grammar.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
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 -
Method Summary
Modifier and TypeMethodDescriptionfinal voidgenerate()Generate the output files.final StringGet the name of the class.abstract org.gradle.api.file.RegularFilePropertyGet the generatedCMakeLists.txtfile.abstract org.gradle.api.file.DirectoryPropertyGet the directory of the generated files.final FileGet the base directory of the grammar.final File[]Get the source files of the grammar.final StringGet the name of the grammar.abstract org.gradle.api.file.RegularFilePropertyGet the generated C interop def file.final StringGet the name of the C interop def file.Get the language methods.final StringGet the name of the JNI library.final StringGet the name of the package.final voidsetClassName(String className) Set the name of the class.final voidsetGrammarDir(File grammarDir) Set the base directory of the grammar.final voidsetGrammarFiles(File[] grammarFiles) Set the source files of the grammar.final voidsetGrammarName(String grammarName) Set the name of the grammar.final voidsetInteropName(String interopName) Set the name of the C interop def file.final voidsetLanguageMethods(Map<String, String> languageMethods) Set the language methods.final voidsetLibraryName(String libraryName) Set the name of the JNI library.final voidsetPackageName(String packageName) Set the name of the package.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, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
GrammarFilesTask
public GrammarFilesTask()
-
-
Method Details
-
getGrammarDir
Get the base directory of the grammar. -
setGrammarDir
Set the base directory of the grammar. -
getGrammarName
Get the name of the grammar. -
setGrammarName
Set the name of the grammar. -
getGrammarFiles
Get the source files of the grammar. -
setGrammarFiles
Set the source files of the grammar. -
getInteropName
Get the name of the C interop def file. -
setInteropName
Set the name of the C interop def file. -
getLibraryName
Get the name of the JNI library. -
setLibraryName
Set the name of the JNI library. -
getPackageName
Get the name of the package. -
setPackageName
Set the name of the package.- Throws:
org.gradle.api.GradleException
-
getClassName
Get the name of the class. -
setClassName
Set the name of the class.- Throws:
org.gradle.api.GradleException
-
getLanguageMethods
Get the language methods. -
setLanguageMethods
public final void setLanguageMethods(Map<String, String> languageMethods) throws org.gradle.api.GradleExceptionSet the language methods.- Throws:
org.gradle.api.GradleException
-
getGeneratedSrc
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getGeneratedSrc()Get the directory of the generated files. -
getCmakeListsFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getCmakeListsFile()Get the generatedCMakeLists.txtfile. -
getInteropFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getInteropFile()Get the generated C interop def file. -
generate
public final void generate() throws org.gradle.api.GradleExceptionGenerate the output files.- Throws:
org.gradle.api.GradleException
-