Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Lazy Configuration for plugin DSL #140

Open
EdricChan03 opened this issue Jul 22, 2024 · 1 comment
Open

Use Lazy Configuration for plugin DSL #140

EdricChan03 opened this issue Jul 22, 2024 · 1 comment
Assignees

Comments

@EdricChan03
Copy link

It would be great if Gradle's Lazy Configuration model was supported (via the plugin DSL), such that values that might be set via other computed values could be used and they would only be evaluated when actually used:

gradleAnalyticsPlugin {
  // Example: Conditionally enabling via providers.environmentVariable (returns Provider<String>)
  enabled = providers.environmentVariable("CI").map { it == "true" } // Provider<Boolean>
}
@janbarari janbarari self-assigned this Jul 22, 2024
@janbarari
Copy link
Owner

Hey @EdricChan03,

Thanks for reporting this feature. I will investigate and update you here.

By the way, if you want to enable or disable the plugin specifically for CI environments, you don't need to do it manually. You can configure the CI database settings to ensure the plugin is active only on the CI server.

Best regards,
Mehdi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants