Package com.konfigyr.gradle
Class KonfigyrExtension
java.lang.Object
com.konfigyr.gradle.KonfigyrExtension
Configuration extension for the Konfigyr Gradle plugin.
Exposes the konfigyr { } DSL block in the consuming project's build script:
konfigyr {
namespace = "acme-corp" or `KONFIGYR_NAMESPACE` environment property
clientId = "acme-corp-client" or `KONFIGYR_CLIENT_ID` environment property
clientSecret = "acme-corp-secret" or `KONFIGYR_CLIENT_SECRET` environment property
// Optional overrides
host = "https://api.konfigyr.io" // defaults to https://api.konfigyr.com
tokenUri = "https://id.konfigyr.io/oauth/token" // defaults to https://id.konfigyr.com/oauth/token
serviceName = "order-service" // defaults to project.name
releasePollTimeout = 10000L // defaults to 10 minutes
releasePollInterval = 1000L // defaults to 1 second
}- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionKonfigyrExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory factory) Creates a newKonfigyrExtensioninstance. -
Method Summary
Modifier and TypeMethodDescriptionorg.gradle.api.provider.Property<String> Specify the OAuthclient_idthat is used to get the OAuth access token.org.gradle.api.provider.Property<String> Specify the OAuthclient_secretthat is used to get the OAuth access token.org.gradle.api.provider.Property<String> getHost()Host where the Konfigyr server is reachable, defaults tohttps://api.konfigyr.com.org.gradle.api.provider.Property<String> Specify the Konfigyr namespace to which this service belongs to.org.gradle.api.provider.Property<Long> The initial time interval in milliseconds between consecutive polling attempts to check for a release.org.gradle.api.provider.Property<Long> The maximum time in milliseconds to wait for a successful poll of a release.org.gradle.api.provider.Property<String> Specify the Konfigyr service name for which this plugin would upload the configuration metadata, defaults to the current project name.org.gradle.api.provider.Property<String> The location where this plugin would perform the OAuth Token exchange, defaults tohttps://id.konfigyr.com/oauth/token.
-
Constructor Details
-
KonfigyrExtension
public KonfigyrExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory factory) Creates a newKonfigyrExtensioninstance.- Parameters:
project- the Gradle projectfactory- the Gradle object factory
-
-
Method Details
-
getHost
Host where the Konfigyr server is reachable, defaults tohttps://api.konfigyr.com. -
getTokenUri
The location where this plugin would perform the OAuth Token exchange, defaults tohttps://id.konfigyr.com/oauth/token. -
getService
Specify the Konfigyr service name for which this plugin would upload the configuration metadata, defaults to the current project name. -
getNamespace
Specify the Konfigyr namespace to which this service belongs to. This value can be specified by theKONFIGYR_NAMESPACEenvironment variable. -
getClientId
Specify the OAuthclient_idthat is used to get the OAuth access token. This value can be specified by theKONFIGYR_CLIENT_IDenvironment variable. -
getClientSecret
Specify the OAuthclient_secretthat is used to get the OAuth access token. This value can be specified by theKONFIGYR_CLIENT_SECRETenvironment variable. -
getReleasePollTimeout
The maximum time in milliseconds to wait for a successful poll of a release. Defaults to 10 minutes.This property defines the overall timeout for the polling process. If a release has not been successfully detected within this duration, the poll job will fail, preventing the build from hanging indefinitely.
-
getReleasePollInterval
The initial time interval in milliseconds between consecutive polling attempts to check for a release. Defaults to one second.This property specifies the starting interval for an exponential backoff strategy. If a poll attempt fails, the next interval will be multiplied by 1.75. This allows for more rapid retries initially, with a gracefully increasing delay for persistent failures. The backoff will continue until a successful poll occurs or the overall
releasePollTimeoutis reached.
-