[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:

View File

@@ -0,0 +1,47 @@
{
"project_info": {
"project_number": "481260393117",
"project_id": "fishing-travel",
"storage_bucket": "fishing-travel.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
"android_client_info": {
"package_name": "com.arkgame.ft"
}
},
"oauth_client": [
{
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.arkgame.ft",
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
}
},
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: de52d9ff9949f4d54b71776fb23da414
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: