parent
a67185679b
commit
7e499aa26c
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
namespace Guru.Editor
|
||||
{
|
||||
using System.Linq;
|
||||
|
|
@ -21,6 +23,10 @@ namespace Guru.Editor
|
|||
private const string GuruKeystorePass = "guru0622";
|
||||
private const string GuruAliasName = "guru";
|
||||
private const string GuruAliasPass = "guru0622";
|
||||
|
||||
private const string UnityGradlePath_2021_3_41 =
|
||||
"/Applications/Unity/Hub/Editor/2021.3.41f1/PlaybackEngines/AndroidPlayer/Tools/gradle";
|
||||
|
||||
private static string GuruKeystorePath => Application.dataPath + $"/Plugins/Android/{GuruKeystoreName}";
|
||||
private static string ProguardName => "proguard-user.txt";
|
||||
private static string ProguardPath => Application.dataPath + $"/Plugins/Android/{ProguardName}";
|
||||
|
|
@ -70,6 +76,8 @@ namespace Guru.Editor
|
|||
SwitchBuildPlatform(BuildTarget.Android);
|
||||
// 打包通用设置
|
||||
ChangeBuildPlayerCommonSetting(buildParam, BuildTargetGroup.Android);
|
||||
// Set GradlePath
|
||||
SetGradlePath();
|
||||
|
||||
var isDebug = !buildParam.IsBuildRelease;
|
||||
var useMinify = buildParam.AndroidUseMinify;
|
||||
|
|
@ -141,7 +149,18 @@ namespace Guru.Editor
|
|||
return apkPath;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
private static void SetGradlePath()
|
||||
{
|
||||
#if UNITY_ANDROID && UNITY_2021_3_41
|
||||
if (Directory.Exists(UnityGradlePath_2021_3_41))
|
||||
{
|
||||
UnityEditor.Android.AndroidExternalToolsSettings.gradlePath = UnityGradlePath_2021_3_41;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 部署 Guru 专用的 Keystore
|
||||
/// </summary>
|
||||
private static bool DeployAndroidKeystore()
|
||||
|
|
|
|||
Loading…
Reference in New Issue