PDK-generated plugins have two layout versions: the legacy version, denoted by flowpdf-plugin-spec: 1
in the config/flowpdf.yaml
file,
and the modern version, denoted by flowpdf-plugin-spec: 2
in the config/flowpdf.yaml
file. The modern, or version 2 of the layout, is used by default for geenrating new plugins. It contains less files in the plugin’s workspace, and meta-files that are fully autogenerated are added to the plugin at the build stage.
All new features, like external credentials support or plugins configuration objects, are implemented for the new layout, so it is advised to migrate the plugins to the new layout.
Migration
Follow these steps to change the layout of the plugin:
-
Backup the existing plugin workspace. That is, commit all the changes to source control.
-
Change
flowpdf-plugin-spec: 1
toflowpdf-plugin-spec: 2
inconfig/flowpdf.yaml
file. -
Run
pdk generate plugin --upgrade --force-cleanup
. This command removes the auto-generated files. -
Revise
ec_setup.pl
file: it should contain only custom logic. If you didn’t add anything into this file, delete it.