How one sbt plugin sets other plugin parameters and then calls this other plugin

I am trying to enlarge an existing plugin, let's call it A-Plugin.

The main task of A-Plugin is using a parameter mappings.

However, setting up the mapping options is tedious for what I need, and can be fully automated. So I'm trying to write a plugin that calculates the correct parameter mappings, installs mappings, and then calls the main A-Plugin task.

I have a task that calibrates the mappings, but I can’t initialize the mappings with it, because the settings cannot depend on the tasks, I also don’t know how to call the A-Plugin task from me when I’m ready.

It seems like it should be command, but the best practice plugin guide says to avoid creating commands in the plugins.

How can i do this? Am I on the right track or is there another idiom I should use?

Part of me now thinks that I just have to set the function to calculate the mappings and just leave it to the plugin user to set mappings from the function .... however, this will work as soon as sbt .. is started, whereas I need to run it after execution some other tasks.

Does anyone know what to do?

thank

+4
source share
1 answer

, Plugins Best Practices . , , , , .

:

, . sbt-inspectr , .

, , , , . , ,

0

All Articles