From discussion in https://invent.kde.org/frameworks/kcoreaddons/-/merge_requests/107.
The function does not require one to explicitly define the JSON file. The moc process automatically reacts to changes in the file and rebuilds the plugin if needed.
This is done using https://api.kde.org/ecm/module/ECMSetupQtPluginMacroNames.html.
Only if the JSON file is created during the build it might be necessary, but then the kcoreaddons_desktop_to_json function is used anyways. In case the file gets configured for example to inject version information the changes are correctly picked up, this is used in ark already.
Consequently we should remove the parameters from the (hundreds of) function calls, mark the option as deprecated and add a version guard to ignore the parameter when the ECM find version is increased.