func NewBundle(name string, version Version, plugins ...Plugin) (Bundle, error) {
	supportedProjectVersions := CommonSupportedProjectVersions(plugins...)
	if len(supportedProjectVersions) == 0 {
		return nil, fmt.Errorf("in order to bundle plugins, they must all support at least one common project version")
	}
	allPlugins := make([]Plugin, 0, len(plugins))
	for _, plugin := range plugins {
		if pluginBundle, isBundle := plugin.(Bundle); isBundle {
			allPlugins = append(allPlugins, pluginBundle.Plugins()...)
		} else {
			allPlugins = append(allPlugins, plugin)
		}
	}
	return bundle{
		name:                     name,
		version:                  version,
		plugins:                  allPlugins,
		supportedProjectVersions: supportedProjectVersions,
	}, nil
}
NewBundle creates a new Bundle with the provided name and version, and that wraps the provided plugins.
The list of supported project versions is computed from the provided plugins.
package plugin
import (
	"fmt"
	"sigs.k8s.io/kubebuilder/v3/pkg/config"
)
type bundle struct {
	name    string
	version Version
	plugins []Plugin
	supportedProjectVersions []config.Version
}