Class CommonPropertyBuilder

java.lang.Object
io.github.srdjanv.localgitdependency.property.impl.CommonPropertyFields
io.github.srdjanv.localgitdependency.property.impl.CommonPropertyBuilder
All Implemented Interfaces:
CommonBuilder
Direct Known Subclasses:
DependencyProperty.Builder, GlobalProperty.Builder

public abstract class CommonPropertyBuilder extends CommonPropertyFields implements CommonBuilder
Base property's used for dependency and global configuration. A new dependency will inherit properties from the global configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    How the dependency is going to be added to the project
    void
    enableIdeSupport(Boolean enableIdeSupport)
    By enabling this the plugin will register the source sets, configurations, its dependencies to your project.
    void
    generateGradleTasks(Boolean generateGradleTasks)
    Custom tasks can be generated for this dependency
    void
    gitDir(File dir)
    This will set the directory in which the dependency will be created, it will not set the folder.
    void
    Same as the above, but takes a string
    void
    gradleDaemonMaxIdleTime(Integer gradleDaemonMaxIdleTime)
    For how long should the gradle daemon used for dependency building idle.
    void
    javaHomeDir(File javaHomeDir)
    Some project need a specific java version to be build, specify the path of the JDK
    void
    javaHomeDir(String javaHomeDir)
    Same as the above, but takes a string
    void
    keepDependencyInitScriptUpdated(Boolean keepDependencyInitScriptUpdated)
    If set to false the generated dependencyInitScript will never be updated of fixed if changes are detected
    void
    keepGitUpdated(Boolean keepGitUpdated)
    This will try to keep the gir repo of the dependency updated
    void
    mavenDir(File mavenDir)
    Some Dependency types will publish the artifact to local maven repo.
    void
    mavenDir(String mavenDir)
    Same as the above, but takes a string
    void
    persistentDir(File persistentDir)
    This will set the directory in which the dependency data will be stored, it will not set the folder.
    void
    persistentDir(String persistentDir)
    Same as the above, but takes a string
    void
    registerDependencyRepositoryToProject(Boolean registerDependencyRepositoryToProject)
    If a repository should be added for the build dependency, this will not do anything for the Jar dependency type
    void
    tryGeneratingJavaDocJar(Boolean tryGeneratingJavaDocJar)
    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
    void
    tryGeneratingSourceJar(Boolean tryGeneratingSourceJar)
    If the cloned dependency doesn't have a task that is going to make a source jar, the plugin can try to generate one

    Methods inherited from class java.lang.Object

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

    • keepGitUpdated

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

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

      public void gitDir(File dir)
      Description copied from interface: CommonBuilder
      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 CommonBuilder
      Parameters:
      dir - directory target
    • gitDir

      public void gitDir(String dir)
      Description copied from interface: CommonBuilder
      Same as the above, but takes a string
      Specified by:
      gitDir in interface CommonBuilder
      Parameters:
      dir - directory target
    • javaHomeDir

      public void javaHomeDir(File javaHomeDir)
      Description copied from interface: CommonBuilder
      Some project need a specific java version to be build, specify the path of the JDK
      Specified by:
      javaHomeDir in interface CommonBuilder
      Parameters:
      javaHomeDir - Path to the JDK
    • javaHomeDir

      public void javaHomeDir(String javaHomeDir)
      Description copied from interface: CommonBuilder
      Same as the above, but takes a string
      Specified by:
      javaHomeDir in interface CommonBuilder
      Parameters:
      javaHomeDir - directory target
    • persistentDir

      public void persistentDir(File persistentDir)
      Description copied from interface: CommonBuilder
      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 CommonBuilder
      Parameters:
      persistentDir - directory target
    • persistentDir

      public void persistentDir(String persistentDir)
      Description copied from interface: CommonBuilder
      Same as the above, but takes a string
      Specified by:
      persistentDir in interface CommonBuilder
      Parameters:
      persistentDir - directory target
    • mavenDir

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

      public void mavenDir(String mavenDir)
      Description copied from interface: CommonBuilder
      Same as the above, but takes a string
      Specified by:
      mavenDir in interface CommonBuilder
      Parameters:
      mavenDir - directory target
    • dependencyType

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

      public void tryGeneratingSourceJar(Boolean tryGeneratingSourceJar)
      Description copied from interface: CommonBuilder
      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 CommonBuilder
      Parameters:
      tryGeneratingSourceJar - if it should try
    • tryGeneratingJavaDocJar

      public void tryGeneratingJavaDocJar(Boolean tryGeneratingJavaDocJar)
      Description copied from interface: CommonBuilder
      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 CommonBuilder
      Parameters:
      tryGeneratingJavaDocJar - if it should try
    • enableIdeSupport

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

      Disabled by default

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

      public void registerDependencyRepositoryToProject(Boolean registerDependencyRepositoryToProject)
      Description copied from interface: CommonBuilder
      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 CommonBuilder
      Parameters:
      registerDependencyRepositoryToProject - if it should register the dependency
      See Also:
    • generateGradleTasks

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

      public void gradleDaemonMaxIdleTime(Integer gradleDaemonMaxIdleTime)
      Description copied from interface: CommonBuilder
      For how long should the gradle daemon used for dependency building idle. Use java's TimeUnit class for easy conversion
      Specified by:
      gradleDaemonMaxIdleTime in interface CommonBuilder
      Parameters:
      gradleDaemonMaxIdleTime - the amount of time in seconds
      See Also: