com.taptap.sdk.update 4.3.0-aplha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Mobile/Editor/NativeDependencies.xml +15 -0
- package/Mobile/Editor/NativeDependencies.xml.meta +3 -0
- package/Mobile/Editor/TapAndroidProvider.txt +58 -0
- package/Mobile/Editor/TapAndroidProvider.txt.meta +7 -0
- package/Mobile/Editor/TapSDK.Update.Mobile.Editor.asmdef +17 -0
- package/Mobile/Editor/TapSDK.Update.Mobile.Editor.asmdef.meta +7 -0
- package/Mobile/Editor/TapUpdateMobileProcessBuild.cs +20 -0
- package/Mobile/Editor/TapUpdateMobileProcessBuild.cs.meta +11 -0
- package/Mobile/Editor.meta +8 -0
- package/Mobile/Runtime/TapSDK.Update.Mobile.Runtime.asmdef +21 -0
- package/Mobile/Runtime/TapSDK.Update.Mobile.Runtime.asmdef.meta +7 -0
- package/Mobile/Runtime/TapUpdateMobile.cs +40 -0
- package/Mobile/Runtime/TapUpdateMobile.cs.meta +11 -0
- package/Mobile/Runtime.meta +8 -0
- package/Mobile.meta +8 -0
- package/Runtime/Internal/ITapUpdateBridge.cs +8 -0
- package/Runtime/Internal/ITapUpdateBridge.cs.meta +11 -0
- package/Runtime/Internal/TapUpdateInitTask.cs +25 -0
- package/Runtime/Internal/TapUpdateInitTask.cs.meta +11 -0
- package/Runtime/Internal.meta +8 -0
- package/Runtime/Public/TapTapUpdate.cs +24 -0
- package/Runtime/Public/TapTapUpdate.cs.meta +11 -0
- package/Runtime/Public.meta +8 -0
- package/Runtime/TapTap.Update.Runtime.asmdef +15 -0
- package/Runtime/TapTap.Update.Runtime.asmdef.meta +7 -0
- package/Runtime.meta +8 -0
- package/package.json +11 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<dependencies>
|
|
3
|
+
|
|
4
|
+
<!-- Android maven dependencies -->Ï
|
|
5
|
+
<androidPackages>
|
|
6
|
+
<repositories>
|
|
7
|
+
<repository>https://repo.maven.apache.org/maven2</repository>
|
|
8
|
+
</repositories>
|
|
9
|
+
<androidPackage spec="com.taptap.sdk:tap-update:4.3.0"/>
|
|
10
|
+
</androidPackages>
|
|
11
|
+
|
|
12
|
+
<!-- iOS Cocoapod dependencies can be specified by each iosPod element. -->
|
|
13
|
+
|
|
14
|
+
</dependencies>
|
|
15
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Version": 1,
|
|
3
|
+
"Use": true,
|
|
4
|
+
"AndroidGradleContext": [
|
|
5
|
+
{
|
|
6
|
+
"locationType": 1,
|
|
7
|
+
"unityVersionCompatibleType": 1,
|
|
8
|
+
"templateType": 6,
|
|
9
|
+
"processType": 1,
|
|
10
|
+
"locationParam": "ADDITIONAL_PROPERTIES",
|
|
11
|
+
"processContent": [
|
|
12
|
+
"android.useAndroidX=true"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"locationType": 2,
|
|
17
|
+
"unityVersionCompatibleType": 0,
|
|
18
|
+
"templateType": 5,
|
|
19
|
+
"processType": 2,
|
|
20
|
+
"locationParam": "classpath 'com.android.tools.build:gradle:3.\\d{1}.\\d{1}'",
|
|
21
|
+
"processContent": [
|
|
22
|
+
"classpath 'com.android.tools.build:gradle:4.0.1'"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"locationType": 2,
|
|
27
|
+
"unityVersionCompatibleType": 0,
|
|
28
|
+
"templateType": 5,
|
|
29
|
+
"processType": 2,
|
|
30
|
+
"locationParam": "classpath 'com.android.tools.build:gradle:4.0.0'",
|
|
31
|
+
"processContent": [
|
|
32
|
+
"classpath 'com.android.tools.build:gradle:4.0.1'"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"locationType": 2,
|
|
37
|
+
"unityVersionCompatibleType": 0,
|
|
38
|
+
"templateType": 5,
|
|
39
|
+
"processType": 2,
|
|
40
|
+
"locationParam": "classpath 'com.android.tools.build:gradle:3.\\d{1}.\\d{1}'",
|
|
41
|
+
"processContent": [
|
|
42
|
+
"classpath 'com.android.tools.build:gradle:4.0.1'"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"locationType": 2,
|
|
47
|
+
"unityVersionCompatibleType": 0,
|
|
48
|
+
"templateType": 5,
|
|
49
|
+
"processType": 2,
|
|
50
|
+
"locationParam": "classpath 'com.android.tools.build:gradle:4.0.0'",
|
|
51
|
+
"processContent": [
|
|
52
|
+
"classpath 'com.android.tools.build:gradle:4.0.1'"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"Priority": 2,
|
|
57
|
+
"ModuleName": "TapTap.Update"
|
|
58
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TapSDK.Update.Mobile.Editor",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:56f3da7a178484843974054bafe77e73"
|
|
5
|
+
],
|
|
6
|
+
"includePlatforms": [
|
|
7
|
+
"Editor"
|
|
8
|
+
],
|
|
9
|
+
"excludePlatforms": [],
|
|
10
|
+
"allowUnsafeCode": false,
|
|
11
|
+
"overrideReferences": false,
|
|
12
|
+
"precompiledReferences": [],
|
|
13
|
+
"autoReferenced": true,
|
|
14
|
+
"defineConstraints": [],
|
|
15
|
+
"versionDefines": [],
|
|
16
|
+
"noEngineReferences": false
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using UnityEditor.Build.Reporting;
|
|
3
|
+
using TapSDK.Core.Editor;
|
|
4
|
+
|
|
5
|
+
namespace TapSDK.Update.Mobile.Editor {
|
|
6
|
+
public class TapUpdateMobileProcessBuild : SDKLinkProcessBuild {
|
|
7
|
+
public override int callbackOrder => 0;
|
|
8
|
+
|
|
9
|
+
public override string LinkPath => "TapSDK/Update/link.xml";
|
|
10
|
+
|
|
11
|
+
public override LinkedAssembly[] LinkedAssemblies => new LinkedAssembly[] {
|
|
12
|
+
// new LinkedAssembly { Fullname = "TapSDK.Update.Runtime" },
|
|
13
|
+
new LinkedAssembly { Fullname = "TapSDK.Update.Mobile.Runtime" }
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
public override Func<BuildReport, bool> IsTargetPlatform => (report) => {
|
|
17
|
+
return BuildTargetUtils.IsSupportMobile(report.summary.platform);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TapSDK.Update.Mobile.Runtime",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:89a99d04b975e4813bb096587570e125",
|
|
5
|
+
"GUID:7d5ef2062f3704e1ab74aac0e4d5a1a7",
|
|
6
|
+
"GUID:10560023d8780423cb943c7a324b69f2",
|
|
7
|
+
"GUID:70428f3d1346341e18f02c35874af89a"
|
|
8
|
+
],
|
|
9
|
+
"includePlatforms": [
|
|
10
|
+
"Android",
|
|
11
|
+
"iOS"
|
|
12
|
+
],
|
|
13
|
+
"excludePlatforms": [],
|
|
14
|
+
"allowUnsafeCode": false,
|
|
15
|
+
"overrideReferences": false,
|
|
16
|
+
"precompiledReferences": [],
|
|
17
|
+
"autoReferenced": true,
|
|
18
|
+
"defineConstraints": [],
|
|
19
|
+
"versionDefines": [],
|
|
20
|
+
"noEngineReferences": false
|
|
21
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
using System.Collections.Generic;
|
|
2
|
+
using TapSDK.Core;
|
|
3
|
+
using System;
|
|
4
|
+
using TapSDK.Update.Internal;
|
|
5
|
+
|
|
6
|
+
namespace TapSDK.Update.Mobile {
|
|
7
|
+
public class TapUpdateMobile : ITapUpdateBridge {
|
|
8
|
+
public static string TAP_UPDATE_SERVICE = "BridgeUpdateService";
|
|
9
|
+
|
|
10
|
+
public static string TDS_UPDATE_SERVICE_CLZ = "com.taptap.sdk.update.enginebridge.BridgeUpdateService";
|
|
11
|
+
|
|
12
|
+
public static string TDS_UPDATE_SERVICE_IMPL = "com.taptap.sdk.update.enginebridge.BridgeUpdateServiceImpl";
|
|
13
|
+
|
|
14
|
+
public TapUpdateMobile() {
|
|
15
|
+
EngineBridge.GetInstance().Register(TDS_UPDATE_SERVICE_CLZ, TDS_UPDATE_SERVICE_IMPL);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public void Init(string clientId, string clientToken) {}
|
|
19
|
+
|
|
20
|
+
public void UpdateGame(Action onCancel) {
|
|
21
|
+
#if UNITY_ANDROID
|
|
22
|
+
var command = new Command.Builder()
|
|
23
|
+
.Service(TAP_UPDATE_SERVICE)
|
|
24
|
+
.Method("updateGame")
|
|
25
|
+
.Callback(true)
|
|
26
|
+
.OnceTime(false)
|
|
27
|
+
.CommandBuilder();
|
|
28
|
+
EngineBridge.GetInstance().CallHandler(command, (result) => {
|
|
29
|
+
UnityEngine.Debug.LogFormat("TapUpdate::UpdateGame result:{0}", result.ToJSON());
|
|
30
|
+
if (result.code == Result.RESULT_SUCCESS && result.content.ToLower().Contains("cancel")) {
|
|
31
|
+
onCancel?.Invoke();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
#else
|
|
36
|
+
throw new NotImplementedException("TapUpdate::UpdateGame Only Support On Android");
|
|
37
|
+
#endif
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/Mobile.meta
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
using TapSDK.Core;
|
|
2
|
+
using TapSDK.Core.Internal.Init;
|
|
3
|
+
using TapSDK.Update;
|
|
4
|
+
|
|
5
|
+
namespace TapSDK.Update.Internal.Init {
|
|
6
|
+
public sealed class TapUpdateInitTask : IInitTask {
|
|
7
|
+
public int Order => 14;
|
|
8
|
+
|
|
9
|
+
public void Init(TapTapSDKCoreOptions coreOption){
|
|
10
|
+
#if !UNITY_EDITOR && UNITY_ANDROID
|
|
11
|
+
TapTapUpdate.Init(coreOption.clientId, coreOption.clientToken);
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public void Init(TapTapSDKCoreOptions coreOption, TapTapSDKBaseOption[] otherOptions)
|
|
17
|
+
{
|
|
18
|
+
#if !UNITY_EDITOR && UNITY_ANDROID
|
|
19
|
+
TapTapUpdate.Init(coreOption.clientId, coreOption.clientToken);
|
|
20
|
+
#endif
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
using TapSDK.Update.Internal;
|
|
2
|
+
using TapSDK.Core.Internal.Utils;
|
|
3
|
+
using TapSDK.Core;
|
|
4
|
+
using System;
|
|
5
|
+
|
|
6
|
+
namespace TapSDK.Update {
|
|
7
|
+
public class TapTapUpdate {
|
|
8
|
+
static readonly ITapUpdateBridge update;
|
|
9
|
+
|
|
10
|
+
static TapTapUpdate() {
|
|
11
|
+
update = BridgeUtils.CreateBridgeImplementation(typeof(ITapUpdateBridge), "TapSDK.Update")
|
|
12
|
+
as ITapUpdateBridge;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
internal static void Init(string clientId, string clientToken)
|
|
16
|
+
{
|
|
17
|
+
update.Init(clientId, clientToken);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public static void UpdateGame(Action onCancel) {
|
|
21
|
+
update.UpdateGame(onCancel);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TapSDK.Update.Runtime",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:7d5ef2062f3704e1ab74aac0e4d5a1a7"
|
|
5
|
+
],
|
|
6
|
+
"includePlatforms": [],
|
|
7
|
+
"excludePlatforms": [],
|
|
8
|
+
"allowUnsafeCode": false,
|
|
9
|
+
"overrideReferences": false,
|
|
10
|
+
"precompiledReferences": [],
|
|
11
|
+
"autoReferenced": true,
|
|
12
|
+
"defineConstraints": [],
|
|
13
|
+
"versionDefines": [],
|
|
14
|
+
"noEngineReferences": false
|
|
15
|
+
}
|
package/Runtime.meta
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "com.taptap.sdk.update",
|
|
3
|
+
"displayName": "TapTapSDK Update",
|
|
4
|
+
"description": "TapTap Develop Service",
|
|
5
|
+
"version": "4.3.0-aplha.13",
|
|
6
|
+
"unity": "2019.4",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"com.taptap.sdk.core": "4.3.0-aplha.13"
|
|
10
|
+
}
|
|
11
|
+
}
|