Skip to content

Conversation

rieske
Copy link
Contributor

@rieske rieske commented May 27, 2020

Exposes an API provided by #13107 for public use via the ProviderFactory interface.

Credentials provider can be obtained and attached to a task's input in a build script like this:

def loginProvider = providers.credentials(PasswordCredentials, 'login')
inputs.property('credentials', loginProvider)

doFirst {
    // do something with the provider. It will have been validated for presence by the time this task executes.
}

@rieske rieske added in:core @core Issue owned by GBT Core labels May 27, 2020
@rieske rieske requested a review from big-guy May 27, 2020 10:48
@rieske rieske self-assigned this May 27, 2020
@eskatos
Copy link
Member

eskatos commented May 27, 2020

❓At first sight, something stands out for me. What's the motivation to introduce a new type and Project API / DSL entry point? Was adding providers.credentials(..) considered? I think it would be in line with providers.gradleProperty(..), providers.systemProperty(..), providers.environmentVariable(..), providers.fileContents(..) etc... WDYT?

@rieske
Copy link
Contributor Author

rieske commented May 27, 2020

That's what I wanted to do initially. What stopped me was how the involved classes are arranged into modules - DefaultProviderFactory lives in model-core and does not have access to the credentials implementations.

Now that I have everything wired and tested internally, I will give it another attempt and might be able to rearrange some things to make what you suggested possible.

@rieske rieske changed the title Expose credentials provider factory via Project Expose credentials provider factory via ProviderFactory interface May 28, 2020
@big-guy big-guy added this to the 6.6 RC1 milestone Jun 17, 2020
@big-guy big-guy closed this Jun 24, 2020
@rieske rieske deleted the vv/credentials-providers-project branch June 24, 2020 12:45
@ov7a ov7a removed this from the 6.6 RC1 milestone Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@core Issue owned by GBT Core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants