diff --git a/AUTHORS b/AUTHORS index 5a33b3d9d..cd42f2ea2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -28,3 +28,4 @@ Japnit Singh Dmitry Kandalov Kazuya Chikamatsu Dustin Feucht +Nico Mexis diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efe3cb29..f7fd6d497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ### Added +- Missing platforms and targets to Build menu. + ### Changed ### Removed diff --git a/resources/META-INF/plugin.xml b/resources/META-INF/plugin.xml index 5c943d83d..1ff9dccae 100644 --- a/resources/META-INF/plugin.xml +++ b/resources/META-INF/plugin.xml @@ -163,11 +163,19 @@ + + + + diff --git a/src/io/flutter/actions/FlutterBuildActionGroup.java b/src/io/flutter/actions/FlutterBuildActionGroup.java index 365514843..57fd07f43 100644 --- a/src/io/flutter/actions/FlutterBuildActionGroup.java +++ b/src/io/flutter/actions/FlutterBuildActionGroup.java @@ -68,8 +68,12 @@ public enum BuildType { AAR("aar"), APK("apk"), APP_BUNDLE("appbundle"), + BUNDLE("bundle"), IOS("ios"), - WEB("web"); + LINUX("linux"), + MACOS("macos"), + WEB("web"), + WINDOWS("windows"); final public String type; @@ -183,6 +187,13 @@ public static class AppBundle extends FlutterBuildAction { } } + public static class Bundle extends FlutterBuildAction { + @Override + protected @NotNull BuildType buildType() { + return BuildType.BUNDLE; + } + } + public static class Ios extends FlutterBuildAction { @Override protected @NotNull BuildType buildType() { @@ -196,6 +207,32 @@ public void update(@NotNull AnActionEvent event) { } } + public static class Linux extends FlutterBuildAction { + @Override + protected @NotNull BuildType buildType() { + return BuildType.LINUX; + } + + @Override + public void update(@NotNull AnActionEvent event) { + final Presentation presentation = event.getPresentation(); + presentation.setEnabled(SystemInfo.isLinux); + } + } + + public static class Macos extends FlutterBuildAction { + @Override + protected @NotNull BuildType buildType() { + return BuildType.MACOS; + } + + @Override + public void update(@NotNull AnActionEvent event) { + final Presentation presentation = event.getPresentation(); + presentation.setEnabled(SystemInfo.isMac); + } + } + public static class Web extends FlutterBuildAction { @Override @@ -203,4 +240,17 @@ public static class Web extends FlutterBuildAction { return BuildType.WEB; } } + + public static class Windows extends FlutterBuildAction { + @Override + protected @NotNull BuildType buildType() { + return BuildType.WINDOWS; + } + + @Override + public void update(@NotNull AnActionEvent event) { + final Presentation presentation = event.getPresentation(); + presentation.setEnabled(SystemInfo.isWindows); + } + } }