As we discussed in the Plasma spring, we might get a different applet loading mechanism once applets with precompiled QML can be loaded. This means that the KPackage usage, which is currently part of the public methods and also publicly linked makes such change harder.
For the applets, we no longer need to access the kapckage to get the plugin's metadata, because the applet can simply not embed json metadata and will then get the metadata from kpackage passed to at runtime. Other usages in plasma-workspace use the package to resolve a file url, which can be implemented as an utility method in plasma-frameworks which internally uses KPackage.
Considering that the KPackage bits of the API have few usagesAlso, we should get rid of the public KPackage linking, because most plasma-frameworks consumers do not need kpackage directly.
For doing this, we need to rewrite the plasma_install_applet CMake macro. In KF6, it is a goowe do not need thing to do for KF6e json conversion logic that the kpackage macro currently has.