-
Couldn't load subscription status.
- Fork 80
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_nameinitialize 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/cmdupon plugin import.hover initwill check for 'lib/main_desktop.dart' file and add it if asked.hover initexecutehover plugins listhover plugins listlist golang platform plugin available (--allto also show the one without golang support)hover plugins getwill add go platform plugin by using the import.go.tmpl of that plugin (--forceto 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-runperforms a trial run with no changes made.)hover plugins cleanwill remove unused plugin (has been added and removed from pubspec.yaml) (--purgeto remove used plugin) (try to clean the 'go.mod' file, but it's not mandatory, as it doesn't affect golang compilation) (--dry-runperforms a trial run with no changes made.)hover runwill 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 pluginsuses 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