fix:1、修复bug 2、删除不用的代码和资源,sdk等
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.Callbacks;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
public class GradleFixer
|
||||
{
|
||||
[PostProcessBuild]
|
||||
public static void OnPostBuild(BuildTarget target, string path)
|
||||
{
|
||||
if (target != BuildTarget.Android) return;
|
||||
|
||||
string wrapperPath = Path.Combine(path, "gradle", "wrapper", "gradle-wrapper.properties");
|
||||
string customContent = "distributionUrl=gradle-8.7-bin.zip";
|
||||
|
||||
if (File.Exists(wrapperPath))
|
||||
{
|
||||
File.WriteAllText(wrapperPath, customContent);
|
||||
Debug.Log("✅ gradle-wrapper.properties 已替换为自定义版本");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("⚠️ 未找到 gradle-wrapper.properties,可能 Unity 构建未生成 wrapper");
|
||||
}
|
||||
}
|
||||
}
|
||||
using UnityEditor;
|
||||
using UnityEditor.Callbacks;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
|
||||
public class GradleFixer
|
||||
{
|
||||
[PostProcessBuild]
|
||||
public static void OnPostBuild(BuildTarget target, string path)
|
||||
{
|
||||
if (target != BuildTarget.Android) return;
|
||||
|
||||
// string wrapperPath = Path.Combine(path, "gradle", "wrapper", "gradle-wrapper.properties");
|
||||
// string customContent = "distributionUrl=gradle-8.7-bin.zip";
|
||||
//
|
||||
// if (File.Exists(wrapperPath))
|
||||
// {
|
||||
// File.WriteAllText(wrapperPath, customContent);
|
||||
// Debug.Log("✅ gradle-wrapper.properties 已替换为自定义版本");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.LogWarning("⚠️ 未找到 gradle-wrapper.properties,可能 Unity 构建未生成 wrapper");
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user