I developed a plugin that registers a convention and a bunch of tasks. The convention mostly holds file paths.
I also created a task that uses the file paths defined within the convention
I am now wondering if i should be accessing the convention directly from the task or whether i should be using the conventionMapping to set the values the task uses as defaults.
For many tasks i imagine, using the conventionMapping would be the best approach because that lets you reuse the task in a standalone way. However in this case the file paths not something you would override in any scenario and if i made every path a property of my task then using the task in a standalone fashion would be painful because if i understand correctly then each of the paths would have to be set manually by the caller.
Is it acceptable in that case to access the convention directly from the task ? Or is there some other clever technique i can use that allows these properties to be defaulted to a convention when used directly