-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" ?> | ||
<dependencies> | ||
<androidPackages> | ||
<repositories> | ||
<repository>https://repo.maven.apache.org/maven2</repository> | ||
</repositories> | ||
<androidPackage spec="com.taptap.sdk:tap-update:4.4.0"/> | ||
</androidPackages> | ||
</dependencies> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"Version": 1, | ||
"Use": true, | ||
"AndroidGradleContext": [ | ||
{ | ||
"locationType": 1, | ||
"unityVersionCompatibleType": 1, | ||
"templateType": 6, | ||
"processType": 1, | ||
"locationParam": "ADDITIONAL_PROPERTIES", | ||
"processContent": [ | ||
"android.useAndroidX=true" | ||
] | ||
}, | ||
{ | ||
"locationType": 2, | ||
"unityVersionCompatibleType": 0, | ||
"templateType": 5, | ||
"processType": 2, | ||
"locationParam": "classpath 'com.android.tools.build:gradle:3.\\d{1}.\\d{1}'", | ||
"processContent": [ | ||
"classpath 'com.android.tools.build:gradle:4.0.1'" | ||
] | ||
}, | ||
{ | ||
"locationType": 2, | ||
"unityVersionCompatibleType": 0, | ||
"templateType": 5, | ||
"processType": 2, | ||
"locationParam": "classpath 'com.android.tools.build:gradle:4.0.0'", | ||
"processContent": [ | ||
"classpath 'com.android.tools.build:gradle:4.0.1'" | ||
] | ||
}, | ||
{ | ||
"locationType": 2, | ||
"unityVersionCompatibleType": 0, | ||
"templateType": 5, | ||
"processType": 2, | ||
"locationParam": "classpath 'com.android.tools.build:gradle:3.\\d{1}.\\d{1}'", | ||
"processContent": [ | ||
"classpath 'com.android.tools.build:gradle:4.0.1'" | ||
] | ||
}, | ||
{ | ||
"locationType": 2, | ||
"unityVersionCompatibleType": 0, | ||
"templateType": 5, | ||
"processType": 2, | ||
"locationParam": "classpath 'com.android.tools.build:gradle:4.0.0'", | ||
"processContent": [ | ||
"classpath 'com.android.tools.build:gradle:4.0.1'" | ||
] | ||
} | ||
], | ||
"Priority": 2, | ||
"ModuleName": "TapTap.Update" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "TapSDK.Update.Mobile.Editor", | ||
"references": [ | ||
"GUID:56f3da7a178484843974054bafe77e73" | ||
], | ||
"includePlatforms": [ | ||
"Editor" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using UnityEditor.Build.Reporting; | ||
using TapSDK.Core.Editor; | ||
|
||
namespace TapSDK.Update.Mobile.Editor { | ||
public class TapUpdateMobileProcessBuild : SDKLinkProcessBuild { | ||
public override int callbackOrder => 0; | ||
|
||
public override string LinkPath => "TapSDK/Update/link.xml"; | ||
|
||
public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] { | ||
// new LinkedAssembly { Fullname = "TapSDK.Update.Runtime" }, | ||
new LinkedAssembly { Fullname = "TapSDK.Update.Mobile.Runtime" } | ||
}; | ||
|
||
public override Func<BuildReport, bool> IsTargetPlatform => (report) => { | ||
return BuildTargetUtils.IsSupportMobile(report.summary.platform); | ||
}; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "TapSDK.Update.Mobile.Runtime", | ||
"references": [ | ||
"GUID:89a99d04b975e4813bb096587570e125", | ||
"GUID:7d5ef2062f3704e1ab74aac0e4d5a1a7", | ||
"GUID:10560023d8780423cb943c7a324b69f2", | ||
"GUID:70428f3d1346341e18f02c35874af89a" | ||
], | ||
"includePlatforms": [ | ||
"Android", | ||
"iOS" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System.Collections.Generic; | ||
using TapSDK.Core; | ||
using System; | ||
using TapSDK.Update.Internal; | ||
|
||
namespace TapSDK.Update.Mobile { | ||
public class TapUpdateMobile : ITapUpdateBridge { | ||
public static string TAP_UPDATE_SERVICE = "BridgeUpdateService"; | ||
|
||
public static string TDS_UPDATE_SERVICE_CLZ = "com.taptap.sdk.update.enginebridge.BridgeUpdateService"; | ||
|
||
public static string TDS_UPDATE_SERVICE_IMPL = "com.taptap.sdk.update.enginebridge.BridgeUpdateServiceImpl"; | ||
|
||
public TapUpdateMobile() { | ||
EngineBridge.GetInstance().Register(TDS_UPDATE_SERVICE_CLZ, TDS_UPDATE_SERVICE_IMPL); | ||
} | ||
|
||
public void Init(string clientId, string clientToken) {} | ||
|
||
public void UpdateGame(Action onCancel) { | ||
#if UNITY_ANDROID | ||
var command = new Command.Builder() | ||
.Service(TAP_UPDATE_SERVICE) | ||
.Method("updateGame") | ||
.Callback(true) | ||
.OnceTime(false) | ||
.CommandBuilder(); | ||
EngineBridge.GetInstance().CallHandler(command, (result) => { | ||
UnityEngine.Debug.LogFormat("TapUpdate::UpdateGame result:{0}", result.ToJSON()); | ||
if (result.code == Result.RESULT_SUCCESS && result.content.ToLower().Contains("cancel")) { | ||
onCancel?.Invoke(); | ||
return; | ||
} | ||
}); | ||
#else | ||
throw new NotImplementedException("TapUpdate::UpdateGame Only Support On Android"); | ||
#endif | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System; | ||
|
||
namespace TapSDK.Update.Internal { | ||
public interface ITapUpdateBridge { | ||
void Init(string clientId, string clientToken); | ||
void UpdateGame(Action onCancel); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using TapSDK.Core; | ||
using TapSDK.Core.Internal.Init; | ||
using TapSDK.Update; | ||
|
||
namespace TapSDK.Update.Internal.Init { | ||
public sealed class TapUpdateInitTask : IInitTask { | ||
public int Order => 14; | ||
|
||
public void Init(TapTapSdkOptions coreOption){ | ||
#if !UNITY_EDITOR && UNITY_ANDROID | ||
TapTapUpdate.Init(coreOption.clientId, coreOption.clientToken); | ||
#endif | ||
|
||
} | ||
|
||
public void Init(TapTapSdkOptions coreOption, TapTapSdkBaseOptions[] otherOptions) | ||
{ | ||
#if !UNITY_EDITOR && UNITY_ANDROID | ||
TapTapUpdate.Init(coreOption.clientId, coreOption.clientToken); | ||
#endif | ||
} | ||
|
||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using TapSDK.Update.Internal; | ||
using TapSDK.Core.Internal.Utils; | ||
using TapSDK.Core; | ||
using System; | ||
|
||
namespace TapSDK.Update { | ||
public class TapTapUpdate { | ||
|
||
public static readonly string Version = "4.4.0"; | ||
|
||
static readonly ITapUpdateBridge update; | ||
|
||
static TapTapUpdate() { | ||
update = BridgeUtils.CreateBridgeImplementation(typeof(ITapUpdateBridge), "TapSDK.Update") | ||
as ITapUpdateBridge; | ||
} | ||
|
||
internal static void Init(string clientId, string clientToken) | ||
{ | ||
update.Init(clientId, clientToken); | ||
} | ||
|
||
public static void UpdateGame(Action onCancel) { | ||
update.UpdateGame(onCancel); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.