gradle-baseline
gradle-baseline copied to clipboard
Enabling custom configuration plugin
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"
}
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.
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>"
}