Groovy Documentation

net.researchgate.release
[Groovy] Class PluginHelper

java.lang.Object
  net.researchgate.release.PluginHelper

class PluginHelper

Field Summary
protected java.util.Map attributes

protected Executor executor

protected ReleaseExtension extension

protected Project project

 
Method Summary
java.lang.String exec(java.util.Map options = [:], java.util.List commands)

Executes command specified and retrieves its "stdout" output.

java.io.File findPropertiesFile()

java.lang.String findProperty(java.lang.String key, java.lang.Object defaultVal = null, java.lang.String deprecatedKey = null)

Logger getLog()

Retrieves SLF4J Logger instance.

java.lang.String getReleaseVersion(java.lang.String candidateVersion = "${project.version}")

boolean isVersionDefined()

protected static java.lang.String readLine(java.lang.String message, java.lang.String defaultValue = null)

Reads user input from the console.

java.lang.String tagName()

void updateVersionProperty(java.lang.String newVersion)

Updates properties file (gradle.properties by default) with new version specified.

boolean useAutomaticVersion()

void warnOrThrow(boolean doThrow, java.lang.String message)

protected void writeVersion(java.io.File file, java.lang.String key, java.lang.Object version)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

attributes

protected java.util.Map attributes


executor

protected Executor executor


extension

protected ReleaseExtension extension


project

protected Project project


 
Method Detail

exec

java.lang.String exec(java.util.Map options = [:], java.util.List commands)
Executes command specified and retrieves its "stdout" output.
Returns:
command "stdout" output
Parameters:
failOnStderr - whether execution should fail if there's any "stderr" output produced, "true" by default.
commands - commands to execute


findPropertiesFile

java.io.File findPropertiesFile()


findProperty

java.lang.String findProperty(java.lang.String key, java.lang.Object defaultVal = null, java.lang.String deprecatedKey = null)


getLog

Logger getLog()
Retrieves SLF4J Logger instance. The logger is taken from the Project instance if it's initialized already or from SLF4J LoggerFactory if it's not.
Returns:
SLF4J Logger instance


getReleaseVersion

java.lang.String getReleaseVersion(java.lang.String candidateVersion = "${project.version}")


isVersionDefined

boolean isVersionDefined()


readLine

protected static java.lang.String readLine(java.lang.String message, java.lang.String defaultValue = null)
Reads user input from the console.
Returns:
User input entered or default value if user enters no data
Parameters:
message - Message to display
defaultValue - (optional) default value to display


tagName

java.lang.String tagName()


updateVersionProperty

void updateVersionProperty(java.lang.String newVersion)
Updates properties file (gradle.properties by default) with new version specified. If configured in plugin convention then updates other properties in file additionally to version property
Parameters:
newVersion - new version to store in the file


useAutomaticVersion

boolean useAutomaticVersion()


warnOrThrow

void warnOrThrow(boolean doThrow, java.lang.String message)


writeVersion

protected void writeVersion(java.io.File file, java.lang.String key, java.lang.Object version)


 

Groovy Documentation