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

Enabling custom configuration plugin #1928

Open
Jarvvski opened this issue Sep 29, 2021 · 2 comments
Open

Enabling custom configuration plugin #1928

Jarvvski opened this issue Sep 29, 2021 · 2 comments

Comments

@Jarvvski
Copy link

What happened?

The task of baselineUpdateConfig is seemingly hard-coded to use Palantir specific config options. While it's possible to just create your own .baseline directory, this becomes harder when rolling out to a fleet of Java projects.

I'd like to try applying this within @transferwise, but the config issues becomes a blocker to due to the config delta we would have.

What did you want to happen?

Is there appetite for making the config plugin/remote configurable? I'd be happy to try contributing this myself here, and keep your own plugin as a default if not overridden. I'm thinking of something like the following in the root project:

baseline {
  config: "com.transferwise.gradle:baseline-config"
}
@Jarvvski
Copy link
Author

Jarvvski commented Sep 29, 2021

I see that other plugins reference strict paths to certain files too. Importing files during the idea task extension references palantir specific paths here. Is there a reason these use specific paths and not just whatever XML file is present in the directory?

Even in your own resource set, there's only one XML file anyway.

@robert3005
Copy link
Contributor

You're correct that we reference the intellij config file in the intellij plugin and that needs fixing.

You can already specify custom configuration bundle. https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html#org.gradle.api.artifacts.Configuration:defaultDependencies(org.gradle.api.Action) you can see that defaultDependencies is only ever applied if there's no dependency on the configuration, we do this to avoid boilerplate. What you can do is to have a plugin that does following and then apply to your project which will override whatever the default we had set.

dependencies {
  baseline "com.transferwise.gradle:baseline-config:<version>"
}

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

No branches or pull requests

2 participants