Class DependencyConfig.Builder

All Implemented Interfaces:
DefaultableBuilder, DependencyBuilder
Enclosing class:
DependencyConfig

public static class DependencyConfig.Builder extends DependencyConfigFields implements DependencyBuilder
  • Field Details

    • configurations

      protected groovy.lang.Closure[] configurations
    • subConfigurations

      protected groovy.lang.Closure[] subConfigurations
    • mappings

      protected groovy.lang.Closure[] mappings
    • launcher

      protected groovy.lang.Closure launcher
  • Constructor Details

    • Builder

      public Builder(String url)
  • Method Details

    • configuration

      public void configuration(String configuration)
      Description copied from interface: DependencyBuilder
      To what configuration to add all the generated jars

      preferably this should be a runtimeOnly configuration

      Specified by:
      configuration in interface DependencyBuilder
      Parameters:
      configuration - Configuration name
      See Also:
      • ConfigurationContainer
    • configuration

      public void configuration(groovy.lang.Closure... configurations)
      Specified by:
      configuration in interface DependencyBuilder
      See Also:
    • subConfiguration

      public void subConfiguration(groovy.lang.Closure... configurations)
      Specified by:
      subConfiguration in interface DependencyBuilder
      See Also:
    • mapSourceSets

      public void mapSourceSets(groovy.lang.Closure... mappings)
      Specified by:
      mapSourceSets in interface DependencyBuilder
      See Also:
    • buildLauncher

      public void buildLauncher(groovy.lang.Closure launcher)
      Specified by:
      buildLauncher in interface DefaultableBuilder
      Specified by:
      buildLauncher in interface DependencyBuilder
      See Also:
    • name

      public void name(String name)
      Description copied from interface: DependencyBuilder
      Sets the name of the dependency, it will also be used as the directory name
      Specified by:
      name in interface DependencyBuilder
      Parameters:
      name - Dependency name
    • commit

      public void commit(String commit)
      Specified by:
      commit in interface DependencyBuilder
    • branch

      public void branch(String branch)
      Specified by:
      branch in interface DependencyBuilder
    • tag

      public void tag(String tag)
      Specified by:
      tag in interface DependencyBuilder
    • gitDir

      public void gitDir(Object dir)
      Description copied from interface: DependencyBuilder
      This will set the directory in which the dependency will be created, it will not set the folder. If you set the path to "./libs" the dependency will make a directory based of the dependency name inside the folder
      Specified by:
      gitDir in interface DependencyBuilder
      Parameters:
      dir - directory target
    • persistentDir

      public void persistentDir(Object persistentDir)
      Description copied from interface: DependencyBuilder
      This will set the directory in which the dependency data will be stored, it will not set the folder. If you set the path to "./folder" the dependency will make a directory based of the dependency name inside the folder
      Specified by:
      persistentDir in interface DependencyBuilder
      Parameters:
      persistentDir - directory target
    • mavenDir

      public void mavenDir(Object mavenDir)
      Description copied from interface: DependencyBuilder
      Some Dependency types will publish the artifact to local maven repo.
      Specified by:
      mavenDir in interface DependencyBuilder
      Parameters:
      mavenDir - directory target
      See Also:
    • keepGitUpdated

      public void keepGitUpdated(Boolean keepGitUpdated)
      Description copied from interface: DefaultableBuilder
      This will try to keep the gir repo of the dependency updated
      Specified by:
      keepGitUpdated in interface DefaultableBuilder
      Parameters:
      keepGitUpdated - True if the plugin should update the git repo if the target commit changes
    • keepInitScriptUpdated

      public void keepInitScriptUpdated(Boolean keepInitScriptUpdated)
      Description copied from interface: DefaultableBuilder
      If set to false the generated dependencyInitScript will never be updated of fixed if changes are detected
      Specified by:
      keepInitScriptUpdated in interface DefaultableBuilder
      Parameters:
      keepInitScriptUpdated - If it should stay updated
    • dependencyType

      public void dependencyType(Dependency.Type dependencyType)
      Description copied from interface: DefaultableBuilder
      How the dependency is going to be added to the project
      Specified by:
      dependencyType in interface DefaultableBuilder
      Parameters:
      dependencyType - dependency target
      See Also:
    • tryGeneratingSourceJar

      public void tryGeneratingSourceJar(Boolean tryGeneratingSourceJar)
      Description copied from interface: DefaultableBuilder
      If the cloned dependency doesn't have a task that is going to make a source jar, the plugin can try to generate one
      Specified by:
      tryGeneratingSourceJar in interface DefaultableBuilder
      Parameters:
      tryGeneratingSourceJar - if it should try
    • tryGeneratingJavaDocJar

      public void tryGeneratingJavaDocJar(Boolean tryGeneratingJavaDocJar)
      Description copied from interface: DefaultableBuilder
      If the cloned dependency doesn't have a task that is going to make a java doc jar, the plugin can try to generate one
      Specified by:
      tryGeneratingJavaDocJar in interface DefaultableBuilder
      Parameters:
      tryGeneratingJavaDocJar - if it should try
    • enableIdeSupport

      public void enableIdeSupport(Boolean enableIdeSupport)
      Description copied from interface: DefaultableBuilder
      By enabling this the plugin will register the source sets, configurations, its dependencies to your project.

      Disabled by default

      Specified by:
      enableIdeSupport in interface DefaultableBuilder
      Parameters:
      enableIdeSupport - if it should enable ide support
    • registerDependencyRepositoryToProject

      public void registerDependencyRepositoryToProject(Boolean registerDependencyRepositoryToProject)
      Description copied from interface: DefaultableBuilder
      If a repository should be added for the build dependency, this will not do anything for the Jar dependency type
      Specified by:
      registerDependencyRepositoryToProject in interface DefaultableBuilder
      Parameters:
      registerDependencyRepositoryToProject - if it should register the dependency
      See Also:
    • generateGradleTasks

      public void generateGradleTasks(Boolean generateGradleTasks)
      Description copied from interface: DefaultableBuilder
      Custom tasks can be generated for this dependency
      Specified by:
      generateGradleTasks in interface DefaultableBuilder
      Parameters:
      generateGradleTasks - if it should create custom tasks