Class KonfigyrExtension

java.lang.Object
com.konfigyr.gradle.KonfigyrExtension

@NullMarked public class KonfigyrExtension extends Object
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

    Constructors
    Constructor
    Description
    KonfigyrExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory factory)
    Creates a new KonfigyrExtension instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.gradle.api.provider.Property<String>
    Specify the OAuth client_id that is used to get the OAuth access token.
    org.gradle.api.provider.Property<String>
    Specify the OAuth client_secret that is used to get the OAuth access token.
    org.gradle.api.provider.Property<String>
    Host where the Konfigyr server is reachable, defaults to https://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 to https://id.konfigyr.com/oauth/token.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KonfigyrExtension

      public KonfigyrExtension(org.gradle.api.Project project, org.gradle.api.model.ObjectFactory factory)
      Creates a new KonfigyrExtension instance.
      Parameters:
      project - the Gradle project
      factory - the Gradle object factory
  • Method Details

    • getHost

      public org.gradle.api.provider.Property<String> getHost()
      Host where the Konfigyr server is reachable, defaults to https://api.konfigyr.com.
    • getTokenUri

      public org.gradle.api.provider.Property<String> getTokenUri()
      The location where this plugin would perform the OAuth Token exchange, defaults to https://id.konfigyr.com/oauth/token.
    • getService

      public org.gradle.api.provider.Property<String> getService()
      Specify the Konfigyr service name for which this plugin would upload the configuration metadata, defaults to the current project name.
    • getNamespace

      public org.gradle.api.provider.Property<String> getNamespace()
      Specify the Konfigyr namespace to which this service belongs to. This value can be specified by the KONFIGYR_NAMESPACE environment variable.
    • getClientId

      public org.gradle.api.provider.Property<String> getClientId()
      Specify the OAuth client_id that is used to get the OAuth access token. This value can be specified by the KONFIGYR_CLIENT_ID environment variable.
    • getClientSecret

      public org.gradle.api.provider.Property<String> getClientSecret()
      Specify the OAuth client_secret that is used to get the OAuth access token. This value can be specified by the KONFIGYR_CLIENT_SECRET environment variable.
    • getReleasePollTimeout

      public org.gradle.api.provider.Property<Long> 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

      public org.gradle.api.provider.Property<Long> 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 releasePollTimeout is reached.