Interface GenerateActionsWorkflow

All Superinterfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Named, org.gradle.api.Task

@Internal public sealed interface GenerateActionsWorkflow extends org.gradle.api.Task

This task generates the GitHub Actions workflow file for the project.

If the project is also using the Git Version plugin (currently auto-applied by GradleUtils), it will respect any declared subprojects.

Implementation Note:
See GenerateActionsWorkflowImpl
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.gradle.api.Named

    org.gradle.api.Named.Namer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The name for this task.

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

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Property<String>
    The branch name to use in the workflow file.
    org.gradle.api.provider.Property<Integer>
    The Java version to invoke Gradle with.
    org.gradle.api.provider.Property<String>
    The local path from the root project to the current project to use in the workflow file.
    org.gradle.api.file.RegularFileProperty
    The output file for this task.
    org.gradle.api.provider.ListProperty<String>
    The paths to pass into the workflow file.
    org.gradle.api.provider.Property<String>
    The project name to use in the workflow file.
    org.gradle.api.provider.Property<String>
    The Shared Actions branch to use with this workflow.

    Methods inherited from interface java.lang.Comparable

    compareTo

    Methods inherited from interface org.gradle.api.plugins.ExtensionAware

    getExtensions

    Methods inherited from interface org.gradle.api.Task

    configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, doNotTrackState, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, notCompatibleWithConfigurationCache, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
  • Field Details

    • NAME

      static final String NAME

      The name for this task.

      Each project should only have one of this type of task and it must be named this.

      See Also:
  • Method Details

    • getOutputFile

      @OutputFile org.gradle.api.file.RegularFileProperty getOutputFile()
      The output file for this task.

      Default: rootProject/.github/workflows/publish_name.yaml

      Returns:
      The property for the output file
    • getProjectName

      @Input org.gradle.api.provider.Property<String> getProjectName()

      The project name to use in the workflow file.

      Default: Project.getName()

      Returns:
      The property for the project name
    • getBranch

      @Optional @Input org.gradle.api.provider.Property<String> getBranch()

      The branch name to use in the workflow file.

      Default: Automatically detected by Git Version, otherwise master

      Returns:
      The property for the branch name
      Implementation Note:
      See GenerateActionsWorkflowImpl.DEFAULT_BRANCH
    • getLocalPath

      @Optional @Input org.gradle.api.provider.Property<String> getLocalPath()
      The local path from the root project to the current project to use in the workflow file. This local path is not used to invoke Gradle but rather for Git Version.
      Returns:
      The property for the local path
    • getPaths

      @Optional @Input org.gradle.api.provider.ListProperty<String> getPaths()
      The paths to pass into the workflow file. Prepend a path with ! to ignore it instead of include it. The Git Version plugin will automatically add declared subproject paths to exclude.
      Returns:
      The property for the paths
    • getGradleJavaVersion

      @Input org.gradle.api.provider.Property<Integer> getGradleJavaVersion()

      The Java version to invoke Gradle with.

      Default: The project's toolchain version, or 17 if it is lower than that.

      Returns:
      The property for the Gradle Java version
      Implementation Note:
      See GenerateActionsWorkflowImpl.DEFAULT_GRADLE_JAVA
    • getSharedActionsBranch

      @Input org.gradle.api.provider.Property<String> getSharedActionsBranch()

      The Shared Actions branch to use with this workflow.

      Default: v0

      Returns:
      The property for the Shared Actions branch
      Implementation Note:
      See GenerateActionsWorkflowImpl.DEFAULT_SHARED_ACTIONS_BRANCH