Groovy Documentation

org.ajoberstar.gradle.git.tasks
[Java] Class GitPush

java.lang.Object
  org.gradle.api.DefaultTask
      org.ajoberstar.gradle.git.tasks.GitBase
          org.ajoberstar.gradle.git.tasks.GitPush
All Implemented Interfaces:
AuthenticationSupported

public class GitPush
extends GitBase

Task to push changes to a remote repository.

Since:
0.1.0


Method Summary
void credentials(groovy.lang.Closure closure)

Configures the credentials to use when pushing changes.

PasswordCredentials getCredentials()

Gets the credentials to use when pushing changes.

java.util.List getNamesOrSpecs()

Gets the names or specs to push to.

java.lang.String getRemote()

Gets the remote to push to.

boolean isForce()

Gets whether to force the push.

boolean isPushAll()

Gets whether to push all branches.

boolean isPushTags()

Gets whether tags will also be pushed.

void namesOrSpecs(java.lang.String... namesOrSpecs)

Adds names or specs to push to.

void push()

Pushes changes to a remote repository.

void setCredentials(PasswordCredentials credentials)

Sets the credentials to use when pushing changes.

void setForce(boolean force)

Sets whether to force the push.

void setNamesOrSpecs(java.util.List namesOrSpecs)

Sets the names or specs to push to.

void setPushAll(boolean pushAll)

Sets whether to push all branches.

void setPushTags(boolean pushTags)

Sets whether tags will also be pushed.

void setRemote(java.lang.Object remote)

Sets the remote to push to.

 
Methods inherited from class GitBase
getGit, getRepoDir, setRepoPath
 

Method Detail

credentials

ssWarnings("rawtypes")
	public
public void credentials(groovy.lang.Closure closure)
Configures the credentials to use when pushing changes. This will be passed a PasswordCredentials instance.
Parameters:
closure - the configuration closure


getCredentials

@Input
	@Option
al
	public
public PasswordCredentials getCredentials()
Gets the credentials to use when pushing changes.
Returns:
the credentials


getNamesOrSpecs

@Input
	@Option
al
	public
public java.util.List getNamesOrSpecs()
Gets the names or specs to push to.
Returns:
Names or specs


getRemote

@Input
	public
public java.lang.String getRemote()
Gets the remote to push to. Defaults to "origin".
Returns:
the remote to push to


isForce

@Input
	public
public boolean isForce()
Gets whether to force the push.
Returns:
whether to force the push


isPushAll

@Input
	public
public boolean isPushAll()
Gets whether to push all branches.
Returns:
whether to push all branches


isPushTags

@Input
	public
public boolean isPushTags()
Gets whether tags will also be pushed.
Returns:
whether to push tags


namesOrSpecs

public void namesOrSpecs(java.lang.String... namesOrSpecs)
Adds names or specs to push to.
Parameters:
namesOrSpecs - Names or specs


push

tion
	public
public void push()
Pushes changes to a remote repository.


setCredentials

public void setCredentials(PasswordCredentials credentials)
Sets the credentials to use when pushing changes.
Parameters:
credentials - the credentials


setForce

public void setForce(boolean force)
Sets whether to force the push.
Parameters:
force - whether to force the push


setNamesOrSpecs

public void setNamesOrSpecs(java.util.List namesOrSpecs)
Sets the names or specs to push to.
Parameters:
namesOrSpecs - Names or specs


setPushAll

public void setPushAll(boolean pushAll)
Sets whether to push all branches.
Parameters:
pushAll - whether to push all branches


setPushTags

public void setPushTags(boolean pushTags)
Sets whether tags will also be pushed.
Parameters:
pushTags - whether to push tags


setRemote

public void setRemote(java.lang.Object remote)
Sets the remote to push to.
Parameters:
remote - the remote to push to


 

Groovy Documentation