-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdkbar.package
49 lines (40 loc) · 1.6 KB
/
sdkbar.package
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
APP_ID = variable('APP_ID') # 3718199
sdkbox.copy_files(['app', 'vksdk_library'], PLUGIN_PATH, ANDROID_STUDIO_PROJECT_DIR)
sdkbox.copy_files(['ios/VKSdk.framework', 'ios/VKSdkResources.bundle'], PLUGIN_PATH, IOS_PROJECT_DIR)
sdkbox.copy_files(['Classes/VkSdk.h', 'Classes/VkSdk.hpp', 'Classes/VkSdk.cpp', 'Classes/VkSdk.mm'], PLUGIN_PATH, COCOS_CLASSES_DIR)
# Frameworks/VKSdk.framework
# Frameworks/VKSdkResources.bundle
# Classes/VkSdk.mm
sdkbox.xcode_add_frameworks(['VKSdk.framework', 'VKSdkResources.bundle'])
sdkbox.xcode_add_sources(['VkSdk.mm'])
sdkbox.android_add_xml_item({
'path': 'application',
'tag': 'activity',
'key': 'com.vk.sdk.VKOpenAuthActivity',
'xml': '<activity android:name="com.vk.sdk.VKOpenAuthActivity"></activity>'
})
sdkbox.android_add_xml_item({
'path': 'application',
'tag': 'activity',
'key': 'com.vk.sdk.VKServiceActivity',
'xml': '<activity android:name="com.vk.sdk.VKServiceActivity" android:label="ServiceActivity" android:theme="@style/VK.Transparent"></activity>'
})
sdkbar.appDelegateInject({
'ios': {
'include': 'VkSdk.h',
'function': 'register_all_vksdk_framework'
},
'marker': SDKBOX_PACKAGE_NAME,
'android': {
'include': 'VkSdk.hpp',
'function': 'register_all_vksdk_framework'
}
})
sdkbar.gradleProject('vksdk_library', './vksdk_library')
sdkbox.android_add_sources(['../../Classes/VkSdk.cpp'])
sdkbar.add_xml_item(ANDROID_STUDIO_PROJECT_DIR+'/app/res/values/strings.xml', {
'path': '.',
'tag': 'integer',
'key': 'com_vk_sdk_AppId',
'xml': '<integer name="com_vk_sdk_AppId">'+APP_ID+'</integer>'
})