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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    Generate the output files.
    final String
    Get the name of the class.
    abstract org.gradle.api.file.RegularFileProperty
    Get the generated CMakeLists.txt file.
    abstract org.gradle.api.file.DirectoryProperty
    Get the directory of the generated files.
    final File
    Get the base directory of the grammar.
    final File[]
    Get the source files of the grammar.
    final String
    Get the name of the grammar.
    abstract org.gradle.api.file.RegularFileProperty
    Get the generated C interop def file.
    final String
    Get the name of the C interop def file.
    Get the language methods.
    final String
    Get the name of the JNI library.
    final String
    Get the name of the package.
    final void
    setClassName(String className)
    Set the name of the class.
    final void
    setGrammarDir(File grammarDir)
    Set the base directory of the grammar.
    final void
    setGrammarFiles(File[] grammarFiles)
    Set the source files of the grammar.
    final void
    setGrammarName(String grammarName)
    Set the name of the grammar.
    final void
    setInteropName(String interopName)
    Set the name of the C interop def file.
    final void
    setLanguageMethods(Map<String,String> languageMethods)
    Set the language methods.
    final void
    setLibraryName(String libraryName)
    Set the name of the JNI library.
    final void
    setPackageName(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, usesService

    Methods 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, setImpliesSubProjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, getConvention, notCompatibleWithConfigurationCache
  • Constructor Details

    • GrammarFilesTask

      public GrammarFilesTask()
  • Method Details

    • getGrammarDir

      @InputDirectory @PathSensitive(ABSOLUTE) public final File getGrammarDir()
      Get the base directory of the grammar.
    • setGrammarDir

      public final void setGrammarDir(File grammarDir)
      Set the base directory of the grammar.
    • getGrammarName

      @Input public final String getGrammarName()
      Get the name of the grammar.
    • setGrammarName

      public final void setGrammarName(String grammarName)
      Set the name of the grammar.
    • getGrammarFiles

      @InputFiles @PathSensitive(RELATIVE) public final File[] getGrammarFiles()
      Get the source files of the grammar.
    • setGrammarFiles

      public final void setGrammarFiles(File[] grammarFiles)
      Set the source files of the grammar.
    • getInteropName

      @Input public final String getInteropName()
      Get the name of the C interop def file.
    • setInteropName

      public final void setInteropName(String interopName)
      Set the name of the C interop def file.
    • getLibraryName

      @Input public final String getLibraryName()
      Get the name of the JNI library.
    • setLibraryName

      public final void setLibraryName(String libraryName)
      Set the name of the JNI library.
    • getPackageName

      @Input public final String getPackageName()
      Get the name of the package.
    • setPackageName

      public final void setPackageName(String packageName) throws org.gradle.api.GradleException
      Set the name of the package.
      Throws:
      org.gradle.api.GradleException
    • getClassName

      @Input public final String getClassName()
      Get the name of the class.
    • setClassName

      public final void setClassName(String className) throws org.gradle.api.GradleException
      Set the name of the class.
      Throws:
      org.gradle.api.GradleException
    • getLanguageMethods

      @Input public final Map<String,String> getLanguageMethods()
      Get the language methods.
    • setLanguageMethods

      public final void setLanguageMethods(Map<String,String> languageMethods) throws org.gradle.api.GradleException
      Set 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 generated CMakeLists.txt file.
    • 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.GradleException
      Generate the output files.
      Throws:
      org.gradle.api.GradleException