A simple gradle plugin that allows you to use secrets from doppler.com in a gradle project.
This is useful for people with multiple GitHub repos, CI projects, or local usage to manage their ENV variables from a central place.
Groovy DSL
To use this plugin inside your project, first you have to add our maven.
To do this, open up settings.gradle
and add the following:
pluginManagement {
repositories {
gradlePluginPortal()
maven {
url "https://maven.firstdark.dev/releases"
}
}
}
Next, in your build.gradle
add:
plugins {
id "dev.firstdark.dopple" version "VERSION"
}
Replace VERSION with the version above.
Finally, add the following to your build.gradle
:
dopple {
serviceToken.set("TOKEN")
}
Kotlin DSL
To use this plugin inside your project, first you have to add our maven.
To do this, open up settings.gradle.kts
and add the following:
pluginManagement {
repositories {
gradlePluginPortal()
maven {
url = uri("https://maven.firstdark.dev/releases")
}
}
}
Next, in your build.gradle.kts
add:
plugins {
id("dev.firstdark.dopple") version "VERSION"
}
Replace VERSION with the version above.
Finally, add the following to your build.gradle.kts
:
dopple {
serviceToken.set("TOKEN")
}
You can retrieve your service token from your doppler account.
To get the value of a SECRET from doppler, simply use the following:
dopple.get("KEY")
For example:
publishing {
repositories {
maven {
url dopple.get('MAVEN_URL')
credentials {
username dopple.get('MAVEN_USER')
password dopple.get('MAVEN_PASS')
}
}
}
}
This plugin is licensed under MIT.
If you need any help, open an issue, or visit our DISCORD