Skip to content

Add plugin interface for custom build steps #2933

Description

@freakboy3742

What is the problem or limitation you are having?

We've had a number of requests to add customised steps into the build process:

These are not necessarily processes that Briefcase should support out of the box, but there is clearly a need to support them. Briefcase should provide a plugin interface to allow libraries to add custom steps to the build.

Describe the solution you'd like

A third party package should be able to register an entry point that will be invoked as part of the build command.

A post-build hook would be the bare minimum; it might make sense to expose a pre-build hook as well. Presumably these two entry points would be invoked before and after the BuildCommand.build_app() invocation as part of _build_app().

The call to the plugin should be given the full BuildCommand as an argument, so that plugins can access tools, utility methods like build_path() etc.

Describe alternatives you've considered

It might make sense to expose other entry points (pre/post-create, pre/post-run, pre/post-package etc).

As a convenience (stemming from the original feature request from #436), having a default plugin can run bare shell commands may be useful.

Additional context

The interaction with Docker-based Linux builds may be a complication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Needs design

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions