Class DevelocityConventions
java.lang.Object
io.github.gradle.conventions.customvalueprovider.DevelocityConventions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionDevelocityConventions(org.gradle.api.provider.ProviderFactory providerFactory) -
Method Summary
Modifier and TypeMethodDescriptioncustomValueSearchUrl(Map<String, String> search) org.gradle.api.provider.Provider<String>execAndGetStdout(Path workingDir, String... args) Executes the external process and returns its standard output.getCommitId(File workDir) booleangetEnvVariable(String name, String defaultValue) getEnvVariableThenSystemProperty(String envName, String systemPropertyName, String defaultValue) getSystemProperty(String name) getSystemProperty(String name, String defaultValue) getSystemPropertyThenEnvVariable(String systemPropertyName, String envName) getSystemPropertyThenEnvVariable(String systemPropertyName, String envName, String defaultValue) booleanvoidsetCommitId(Path projectDir, com.gradle.develocity.agent.gradle.scan.BuildScanConfiguration buildScan, String commitId) Add commit ID to tags.org.gradle.api.provider.Provider<String>systemPropertyProvider(String name)
-
Constructor Details
-
DevelocityConventions
public DevelocityConventions(org.gradle.api.provider.ProviderFactory providerFactory)
-
-
Method Details
-
customValueSearchUrl
-
getEdgeDiscovery
public boolean getEdgeDiscovery() -
getDevelocityServerUrl
-
isCiServer
public boolean isCiServer() -
getEnvVariableThenSystemProperty
-
getSystemPropertyThenEnvVariable
-
getSystemPropertyThenEnvVariable
-
getSystemProperty
-
getSystemProperty
-
getEnvVariable
-
getEnv
-
systemPropertyProvider
-
environmentVariableProvider
-
setCommitId
public void setCommitId(Path projectDir, com.gradle.develocity.agent.gradle.scan.BuildScanConfiguration buildScan, String commitId) Add commit ID to tags.- Parameters:
projectDir- the project directorybuildScan- the build scan extensioncommitId- the commit id
-
getCommitId
-
execAndGetStdout
Executes the external process and returns its standard output. An empty optional is returned when the process fails to start or returns an error code.Avoid using this method at configuration time to keep configuration cache compatibility. It is an error with Gradle 7.5+. Since Gradle 7.6 it is safe to use this method in
buildScan.backgroundcallback. Consider implementingValueSourceif you need to obtain external process output at configuration time.- Parameters:
workingDir- the working directoryargs- the process to run and its command-line arguments- Returns:
- the contents of the stdout as a string
-