-
Notifications
You must be signed in to change notification settings - Fork 81
feature plugin dependency management #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0b354d4
to
7ea039b
Compare
The following workflow works:
Tada the platform version is displayed! |
7ea039b
to
2789f5f
Compare
aeb3672
to
daf40cb
Compare
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions. LGTM.
cmd/publish-plugin.go
Outdated
|
||
var publishPluginCmd = &cobra.Command{ | ||
Use: "publish-plugin", | ||
Short: "Assert that your go-flutter plugin can be pushed as golang module in your github repo.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short description is misleading. We don't just assert, we actually run the commands to publish (after confirmation).
Feature run-down
hover init-plugin github.com/my-organization/plugin_name
initialize the current directory (must be a flutter plugin) with go support.The files added are:
go.mod go.sum import.go.tmpl plugin.go README.md
All of them (except go.mod|sum) are generated based on the current pubspec.yaml.
go/cmd
upon plugin import.hover init
will check for 'lib/main_desktop.dart' file and add it if asked.hover init
executehover plugins list
hover plugins list
list golang platform plugin available (--all
to also show the one without golang support)hover plugins get
will add go platform plugin by using the import.go.tmpl of that plugin (--force
to re-add plugins) (respect flutter pubspec.yaml/dev_dependencies/plugin_name/path, by adding the correct replace in the 'go.mod' file (this part is done by applying a regex on the import.go.tmpl file in order to obtain the go module name)) (--dry-run
performs a trial run with no changes made.)hover plugins clean
will remove unused plugin (has been added and removed from pubspec.yaml) (--purge
to remove used plugin) (try to clean the 'go.mod' file, but it's not mandatory, as it doesn't affect golang compilation) (--dry-run
performs a trial run with no changes made.)hover run
will apply the same check asflutter build ..
do with the automaticRunning "flutter pub get" in ...
. This check is used to suggest go platform plugin import.hover plugins
uses the local pub cache & a hosted json mapping list to look for golang pluginfixes: go-flutter-desktop/go-flutter#260
fixes: go-flutter-desktop/go-flutter#143