[U] Sync n3
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
using System.IO;
|
||||
using UnityEditor.Android;
|
||||
|
||||
namespace tysdk.editor
|
||||
{
|
||||
|
||||
public class AndroidPostBuildProcessor : IPostGenerateGradleAndroidProject
|
||||
{
|
||||
public int callbackOrder => 1;
|
||||
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
UnityEngine.Debug.Log($"OnPostGenerateGradleAndroidProject {path}");
|
||||
var projectPath = Directory.GetParent(path).ToString();
|
||||
var googleServicesJsonPath = "Packages/tysdk/Files/google-services.json";
|
||||
var googleServicesTargetPath = Path.Combine(projectPath, "launcher/google-services.json");
|
||||
File.Copy(googleServicesJsonPath, googleServicesTargetPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.IO;
|
||||
using UnityEditor.Android;
|
||||
|
||||
namespace tysdk.editor
|
||||
{
|
||||
|
||||
public class AndroidPostBuildProcessor : IPostGenerateGradleAndroidProject
|
||||
{
|
||||
public int callbackOrder => 1;
|
||||
|
||||
public void OnPostGenerateGradleAndroidProject(string path)
|
||||
{
|
||||
UnityEngine.Debug.Log($"OnPostGenerateGradleAndroidProject {path}");
|
||||
var projectPath = Directory.GetParent(path).ToString();
|
||||
var googleServicesJsonPath = "Packages/tysdk/Files/google-services.json";
|
||||
var googleServicesTargetPath = Path.Combine(projectPath, "launcher/google-services.json");
|
||||
File.Copy(googleServicesJsonPath, googleServicesTargetPath, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2476ed86dea148a3b7327293f8372cd
|
||||
guid: 56f87573a715b418e8502b3402d41a44
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
@@ -55,6 +55,14 @@ namespace tysdk.editor
|
||||
File.WriteAllText(mainAppPath, newContent);
|
||||
}
|
||||
|
||||
private static void ProceeFirebasePlist(string target, PBXProject proj, string root)
|
||||
{
|
||||
var plistPath = Path.Combine("Packages/tysdk/Files", "GoogleService-Info.plist");
|
||||
File.Copy(plistPath, $"{root}/GoogleService-Info.plist", true);
|
||||
var plistGuid = proj.AddFile("GoogleService-Info.plist", "GoogleService-Info.plist", PBXSourceTree.Source);
|
||||
proj.AddFileToBuild(target, plistGuid);
|
||||
}
|
||||
|
||||
private static void XCodeSetSigingAndCapbilities(string target, PBXProject proj, string root)
|
||||
{
|
||||
var entitlementsContent = File.ReadAllText("Packages/tysdk/Files/Unity-iPhone.entitlements");
|
||||
@@ -66,14 +74,6 @@ namespace tysdk.editor
|
||||
//proj.AddCapability(target, PBXCapabilityType.AssociatedDomains, "Unity-iPhone/Unity-iPhone.entitlements");
|
||||
}
|
||||
|
||||
private static void ProceeFirebasePlist(string target, PBXProject proj, string root)
|
||||
{
|
||||
var plistPath = Path.Combine("Packages/tysdk/Files", "GoogleService-Info.plist");
|
||||
File.Copy(plistPath, $"{root}/GoogleService-Info.plist", true);
|
||||
var plistGuid = proj.AddFile("GoogleService-Info.plist", "GoogleService-Info.plist", PBXSourceTree.Source);
|
||||
proj.AddFileToBuild(target, plistGuid);
|
||||
}
|
||||
|
||||
private static void ProcessBuildSettings(PBXProject proj)
|
||||
{
|
||||
string target = proj.TargetGuidByName("GameAssembly");
|
||||
|
||||
Reference in New Issue
Block a user