Class OnePasswordGradlePropertiesPlugin
java.lang.Object
io.github.arve0.onepassword.properties.OnePasswordGradlePropertiesPlugin
- All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>
public final class OnePasswordGradlePropertiesPlugin
extends Object
implements org.gradle.api.Plugin<org.gradle.api.Project>
A Gradle plugin that exposes 1Password secret references as lazy
Provider<String>
extra properties.
For each project property whose value starts with op://, the plugin:
- Validates the reference eagerly (fail-fast at configuration time for obviously invalid refs).
- Registers a
Provider<String>backed byOpReadValueSourcein extra properties, without resolving the secret immediately.
Whether the secret ends up in the configuration cache depends on when the caller calls
.get() on the provider:
- Execution time (e.g. inside
doLast): secret is NOT stored in the cache;opis called once per build at execution time. - Configuration time (e.g. for repository credentials): Gradle fingerprints
the value and stores it in the cache;
opis called on every build for fingerprint validation.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OnePasswordGradlePropertiesPlugin
public OnePasswordGradlePropertiesPlugin()
-
-
Method Details
-
apply
public void apply(org.gradle.api.Project project) - Specified by:
applyin interfaceorg.gradle.api.Plugin<org.gradle.api.Project>
-