A plugin can implement a build plugin, registered with cds.build in its cds-plugin.js and run by cds build to write its own deployment artifacts; 7.6.0 on 2024-01-31 added contributing the build task type to the cds schema for code completion. Dated from npm.
Advice that deployment artifacts a plugin needs must be produced by a script outside cds build.