Skip to content

Commit

Permalink
menu items to build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
achimmihca committed Feb 1, 2023
1 parent 84df7f1 commit f56906a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ public static class UltraStarPlayCompanionBuildTools
{
private static readonly string appName = "UltraStar Play Companion";

[MenuItem("Tools/Build/All")]
public static void BuildAll()
[MenuItem("Tools/Build/Build for release (signed apk, signed app bundle)")]
public static void BuildForRelease()
{
BuildAndRunSignedAndroidApk();
BuildAndRunSignedAndroidAppBundle();
BuildSignedAndroidApk();
BuildSignedAndroidAppBundle();
}

[MenuItem("Tools/Build/Android - Build apk")]
Expand All @@ -26,6 +26,14 @@ public static void BuildAndRunAndroidApk()
BuildUtils.PerformCustomBuild(customBuildOptions);
}

[MenuItem("Tools/Build/Android - Build signed apk")]
public static void BuildSignedAndroidApk()
{
CustomBuildOptions customBuildOptions = CreateCustomBuildOptions(BuildTarget.Android);
customBuildOptions.configureKeystoreForAndroidBuild = true;
BuildUtils.PerformCustomBuild(customBuildOptions);
}

[MenuItem("Tools/Build/Android - Build and run signed apk")]
public static void BuildAndRunSignedAndroidApk()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 1
AndroidBundleVersionCode: 5
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
Expand Down
18 changes: 13 additions & 5 deletions UltraStar Play/Assets/Editor/UltraStarPlayBuildTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ public static class UltraStarPlayBuildTools
{
private static readonly string appName = "UltraStar Play";

[MenuItem("Tools/Build/All")]
[MenuItem("Tools/Build/Build for release (Windows, macOS, Linux, signed apk, signed app bundle)")]
public static void BuildAll()
{
BuildWindows64();
BuildMacOS();
BuildLinux64();
BuildMacOS();;
BuildAndRunAndroidApk();
BuildAndRunSignedAndroidAppBundle();
BuildIOS();
BuildSignedAndroidApk();
BuildSignedAndroidAppBundle();
// BuildIOS();
}

[MenuItem("Tools/Build/Windows64")]
Expand Down Expand Up @@ -48,6 +48,14 @@ public static void BuildAndRunAndroidApk()
BuildUtils.PerformCustomBuild(customBuildOptions);
}

[MenuItem("Tools/Build/Android - Build signed apk")]
public static void BuildSignedAndroidApk()
{
CustomBuildOptions customBuildOptions = CreateCustomBuildOptions(BuildTarget.Android);
customBuildOptions.configureKeystoreForAndroidBuild = true;
BuildUtils.PerformCustomBuild(customBuildOptions);
}

[MenuItem("Tools/Build/Android - Build and run signed apk")]
public static void BuildAndRunSignedAndroidApk()
{
Expand Down
2 changes: 1 addition & 1 deletion UltraStar Play/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
AndroidBundleVersionCode: 1
AndroidBundleVersionCode: 5
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 1
Expand Down

0 comments on commit f56906a

Please sign in to comment.