Groovy Documentation

net.researchgate.release
[Groovy] Class PluginHelper

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

class PluginHelper

Field Summary
protected Executor executor

protected ReleaseExtension extension

protected Project project

 
Method Summary
protected static java.lang.String capitalize(java.lang.String s)

Capitalizes first letter of the String specified.

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.String defaultVal = "")

Logger getLog()

Retrieves SLF4J Logger instance.

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

executor

protected Executor executor


extension

protected ReleaseExtension extension


project

protected Project project


 
Method Detail

capitalize

protected static java.lang.String capitalize(java.lang.String s)
Capitalizes first letter of the String specified.
Returns:
String specified with first letter capitalized
Parameters:
s - String to capitalize


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.String defaultVal = "")


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


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