Class GradleBuildToolAdapter

java.lang.Object
io.github.bud127.modulecomposer.plugin.GradleBuildToolAdapter
All Implemented Interfaces:
io.github.bud127.modulecomposer.core.BuildToolAdapter

public final class GradleBuildToolAdapter extends Object implements io.github.bud127.modulecomposer.core.BuildToolAdapter
Gradle implementation of the generic build-tool adapter contract.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GradleBuildToolAdapter(org.gradle.api.Project root)
    Creates an adapter for the given root project.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Provider<String>
    Resolves the archive file path produced by an archive task.
     
    io.github.bud127.modulecomposer.core.BuildInvocation
    generatedBuild(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter)
     
    io.github.bud127.modulecomposer.core.BuildInvocation
    generatedRun(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter)
     
    io.github.bud127.modulecomposer.core.BuildInvocation
    moduleArtifact(io.github.bud127.modulecomposer.core.ModuleRegistration module)
     
    io.github.bud127.modulecomposer.core.BuildInvocation
    projectArtifact(String projectReference)
     
    boolean
    projectExists(String projectReference)
     
    org.gradle.api.Project
    Finds the project that owns the given Gradle task path.
    io.github.bud127.modulecomposer.core.BuildInvocation
    standaloneBuild(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter, io.github.bud127.modulecomposer.core.ModuleRegistration module)
     
    io.github.bud127.modulecomposer.core.BuildInvocation
    standaloneRun(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter, io.github.bud127.modulecomposer.core.ModuleRegistration module)
     
    taskName(String taskPath)
    Extracts the task name from a Gradle task path.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GradleBuildToolAdapter

      public GradleBuildToolAdapter(org.gradle.api.Project root)
      Creates an adapter for the given root project.
      Parameters:
      root - root Gradle project
  • Method Details

    • buildToolId

      public String buildToolId()
      Specified by:
      buildToolId in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • projectExists

      public boolean projectExists(String projectReference)
      Specified by:
      projectExists in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • standaloneRun

      public io.github.bud127.modulecomposer.core.BuildInvocation standaloneRun(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter, io.github.bud127.modulecomposer.core.ModuleRegistration module)
      Specified by:
      standaloneRun in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • standaloneBuild

      public io.github.bud127.modulecomposer.core.BuildInvocation standaloneBuild(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter, io.github.bud127.modulecomposer.core.ModuleRegistration module)
      Specified by:
      standaloneBuild in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • moduleArtifact

      public io.github.bud127.modulecomposer.core.BuildInvocation moduleArtifact(io.github.bud127.modulecomposer.core.ModuleRegistration module)
      Specified by:
      moduleArtifact in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • projectArtifact

      public io.github.bud127.modulecomposer.core.BuildInvocation projectArtifact(String projectReference)
      Specified by:
      projectArtifact in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • generatedRun

      public io.github.bud127.modulecomposer.core.BuildInvocation generatedRun(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter)
      Specified by:
      generatedRun in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • generatedBuild

      public io.github.bud127.modulecomposer.core.BuildInvocation generatedBuild(io.github.bud127.modulecomposer.core.FrameworkAdapter frameworkAdapter)
      Specified by:
      generatedBuild in interface io.github.bud127.modulecomposer.core.BuildToolAdapter
    • archiveFilePath

      public org.gradle.api.provider.Provider<String> archiveFilePath(String taskPath)
      Resolves the archive file path produced by an archive task.
      Parameters:
      taskPath - task path to an AbstractArchiveTask
      Returns:
      provider for the produced archive absolute path
    • projectForTaskPath

      public org.gradle.api.Project projectForTaskPath(String taskPath)
      Finds the project that owns the given Gradle task path.
      Parameters:
      taskPath - Gradle task path
      Returns:
      owning project
    • taskName

      public String taskName(String taskPath)
      Extracts the task name from a Gradle task path.
      Parameters:
      taskPath - Gradle task path
      Returns:
      task name