[A] Android firebase

This commit is contained in:
2024-12-10 12:15:59 +08:00
parent 05331e6286
commit 4d0ab92a9a
11 changed files with 181 additions and 3 deletions

View File

@@ -0,0 +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);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a2476ed86dea148a3b7327293f8372cd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: