Merge branch 'main' into code-cleanup

pull/511/head
Andrew Kahr 2023-02-20 19:00:31 -08:00
commit b90da4f191
2 changed files with 5 additions and 5 deletions

View File

@ -53,7 +53,7 @@ inputs:
description: '[Deprecated] Use androidExportType instead. Whether to build .aab instead of .apk' description: '[Deprecated] Use androidExportType instead. Whether to build .aab instead of .apk'
androidExportType: androidExportType:
required: false required: false
default: 'androidPackage' default: ''
description: description:
'The android export type. Should be androidPackage for apk, androidAppBundle for aab, or androidStudioProject for 'The android export type. Should be androidPackage for apk, androidAppBundle for aab, or androidStudioProject for
an android studio project.' an android studio project.'
@ -87,7 +87,7 @@ inputs:
description: 'The android symbol type to export. Should be "none", "public" or "debugging".' description: 'The android symbol type to export. Should be "none", "public" or "debugging".'
sshAgent: sshAgent:
required: false required: false
default: 'public' default: ''
description: 'SSH Agent path to forward to the container' description: 'SSH Agent path to forward to the container'
gitPrivateToken: gitPrivateToken:
required: false required: false

View File

@ -5,7 +5,7 @@ using System.Reflection;
namespace UnityBuilderAction.Input namespace UnityBuilderAction.Input
{ {
public class AndroidSettings public static class AndroidSettings
{ {
public static void Apply(Dictionary<string, string> options) public static void Apply(Dictionary<string, string> options)
{ {
@ -49,8 +49,8 @@ namespace UnityBuilderAction.Input
if (options.TryGetValue("androidExportType", out androidExportType) && !string.IsNullOrEmpty(androidExportType)) if (options.TryGetValue("androidExportType", out androidExportType) && !string.IsNullOrEmpty(androidExportType))
{ {
// Only exists in 2018.3 and above // Only exists in 2018.3 and above
FieldInfo buildAppBundle = typeof(EditorUserBuildSettings) PropertyInfo buildAppBundle = typeof(EditorUserBuildSettings)
.GetField("buildAppBundle", System.Reflection.BindingFlags.Public | BindingFlags.Instance); .GetProperty("buildAppBundle", BindingFlags.Public | BindingFlags.Static);
switch (androidExportType) switch (androidExportType)
{ {
case "androidStudioProject": case "androidStudioProject":