Class DependencyConfig.Builder
java.lang.Object
io.github.srdjanv.localgitdependency.config.impl.defaultable.DefaultableConfigFields
io.github.srdjanv.localgitdependency.config.impl.dependency.DependencyConfigFields
io.github.srdjanv.localgitdependency.config.impl.dependency.DependencyConfig.Builder
- All Implemented Interfaces:
DefaultableBuilder,DependencyBuilder
- Enclosing class:
- DependencyConfig
public static class DependencyConfig.Builder
extends DependencyConfigFields
implements DependencyBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected groovy.lang.Closure[]protected groovy.lang.Closureprotected groovy.lang.Closure[]protected groovy.lang.Closure[]Fields inherited from class io.github.srdjanv.localgitdependency.config.impl.dependency.DependencyConfigFields
configuration, configurationConfig, gitDir, mavenDir, name, persistentDir, sourceSetMapperConfig, subConfigurationConfig, target, targetType, urlFields inherited from class io.github.srdjanv.localgitdependency.config.impl.defaultable.DefaultableConfigFields
dependencyType, enableIdeSupport, generateGradleTasks, keepGitUpdated, keepInitScriptUpdated, registerDependencyRepositoryToProject, tryGeneratingJavaDocJar, tryGeneratingSourceJar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbuildLauncher(groovy.lang.Closure launcher) voidvoidconfiguration(groovy.lang.Closure... configurations) voidconfiguration(String configuration) To what configuration to add all the generated jarsvoiddependencyType(Dependency.Type dependencyType) How the dependency is going to be added to the projectvoidenableIdeSupport(Boolean enableIdeSupport) By enabling this the plugin will register the source sets, configurations, its dependencies to your project.voidgenerateGradleTasks(Boolean generateGradleTasks) Custom tasks can be generated for this dependencyvoidThis will set the directory in which the dependency will be created, it will not set the folder.voidkeepGitUpdated(Boolean keepGitUpdated) This will try to keep the gir repo of the dependency updatedvoidkeepInitScriptUpdated(Boolean keepInitScriptUpdated) If set to false the generated dependencyInitScript will never be updated of fixed if changes are detectedvoidmapSourceSets(groovy.lang.Closure... mappings) voidSome Dependency types will publish the artifact to local maven repo.voidSets the name of the dependency, it will also be used as the directory namevoidpersistentDir(Object persistentDir) This will set the directory in which the dependency data will be stored, it will not set the folder.voidregisterDependencyRepositoryToProject(Boolean registerDependencyRepositoryToProject) If a repository should be added for the build dependency, this will not do anything for the Jar dependency typevoidsubConfiguration(groovy.lang.Closure... configurations) voidvoidtryGeneratingJavaDocJar(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 onevoidtryGeneratingSourceJar(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
-
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
-
-
Method Details
-
configuration
Description copied from interface:DependencyBuilderTo what configuration to add all the generated jarspreferably this should be a runtimeOnly configuration
- Specified by:
configurationin interfaceDependencyBuilder- Parameters:
configuration- Configuration name- See Also:
-
ConfigurationContainer
-
configuration
public void configuration(groovy.lang.Closure... configurations) - Specified by:
configurationin interfaceDependencyBuilder- See Also:
-
subConfiguration
public void subConfiguration(groovy.lang.Closure... configurations) - Specified by:
subConfigurationin interfaceDependencyBuilder- See Also:
-
mapSourceSets
public void mapSourceSets(groovy.lang.Closure... mappings) - Specified by:
mapSourceSetsin interfaceDependencyBuilder- See Also:
-
buildLauncher
public void buildLauncher(groovy.lang.Closure launcher) - Specified by:
buildLauncherin interfaceDefaultableBuilder- Specified by:
buildLauncherin interfaceDependencyBuilder- See Also:
-
name
Description copied from interface:DependencyBuilderSets the name of the dependency, it will also be used as the directory name- Specified by:
namein interfaceDependencyBuilder- Parameters:
name- Dependency name
-
commit
- Specified by:
commitin interfaceDependencyBuilder
-
branch
- Specified by:
branchin interfaceDependencyBuilder
-
tag
- Specified by:
tagin interfaceDependencyBuilder
-
gitDir
Description copied from interface:DependencyBuilderThis 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:
gitDirin interfaceDependencyBuilder- Parameters:
dir- directory target
-
persistentDir
Description copied from interface:DependencyBuilderThis 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:
persistentDirin interfaceDependencyBuilder- Parameters:
persistentDir- directory target
-
mavenDir
Description copied from interface:DependencyBuilderSome Dependency types will publish the artifact to local maven repo.- Specified by:
mavenDirin interfaceDependencyBuilder- Parameters:
mavenDir- directory target- See Also:
-
keepGitUpdated
Description copied from interface:DefaultableBuilderThis will try to keep the gir repo of the dependency updated- Specified by:
keepGitUpdatedin interfaceDefaultableBuilder- Parameters:
keepGitUpdated- True if the plugin should update the git repo if the target commit changes
-
keepInitScriptUpdated
Description copied from interface:DefaultableBuilderIf set to false the generated dependencyInitScript will never be updated of fixed if changes are detected- Specified by:
keepInitScriptUpdatedin interfaceDefaultableBuilder- Parameters:
keepInitScriptUpdated- If it should stay updated
-
dependencyType
Description copied from interface:DefaultableBuilderHow the dependency is going to be added to the project- Specified by:
dependencyTypein interfaceDefaultableBuilder- Parameters:
dependencyType- dependency target- See Also:
-
tryGeneratingSourceJar
Description copied from interface:DefaultableBuilderIf 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:
tryGeneratingSourceJarin interfaceDefaultableBuilder- Parameters:
tryGeneratingSourceJar- if it should try
-
tryGeneratingJavaDocJar
Description copied from interface:DefaultableBuilderIf 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:
tryGeneratingJavaDocJarin interfaceDefaultableBuilder- Parameters:
tryGeneratingJavaDocJar- if it should try
-
enableIdeSupport
Description copied from interface:DefaultableBuilderBy enabling this the plugin will register the source sets, configurations, its dependencies to your project.Disabled by default
- Specified by:
enableIdeSupportin interfaceDefaultableBuilder- Parameters:
enableIdeSupport- if it should enable ide support
-
registerDependencyRepositoryToProject
Description copied from interface:DefaultableBuilderIf a repository should be added for the build dependency, this will not do anything for the Jar dependency type- Specified by:
registerDependencyRepositoryToProjectin interfaceDefaultableBuilder- Parameters:
registerDependencyRepositoryToProject- if it should register the dependency- See Also:
-
Dependency.TypeRepositoryHandler
-
generateGradleTasks
Description copied from interface:DefaultableBuilderCustom tasks can be generated for this dependency- Specified by:
generateGradleTasksin interfaceDefaultableBuilder- Parameters:
generateGradleTasks- if it should create custom tasks
-