-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdkbar.package
29 lines (24 loc) · 1.02 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
BILLING_KEY = variable('BILLING_KEY')
sdkbox.copy_files(['app'], PLUGIN_PATH, ANDROID_STUDIO_PROJECT_DIR)
sdkbox.copy_files(['ios'], PLUGIN_PATH, IOS_PROJECT_DIR)
sdkbox.copy_files(['Classes/Iap.cpp', 'Classes/Iap.h', 'Classes/Iap.hpp', 'Classes/Iap.mm'], PLUGIN_PATH, COCOS_CLASSES_DIR)
sdkbox.xcode_add_sources(['Iap.mm', '../proj.ios_mac/ios/FileUtility.m', '../proj.ios_mac/ios/InAppPurchase.m', '../proj.ios_mac/ios/SKProduct+LocalizedPrice.m'])
sdkbox.xcode_add_frameworks(['MessageUI.framework'])
sdkbar.appDelegateInject({
'marker': SDKBOX_PACKAGE_NAME,
'android': {
'include': 'Iap.hpp',
'function': 'register_all_iap_framework'
},
'ios': {
'include': 'Iap.h',
'function': 'register_all_iap_framework'
}
})
sdkbox.android_add_sources(['../../Classes/Iap.cpp'])
sdkbar.add_xml_item(ANDROID_STUDIO_PROJECT_DIR+'/app/res/values/strings.xml', {
'path': '.',
'tag': 'string',
'key': 'billing_key_param',
'xml': '<string name="billing_key_param">'+BILLING_KEY+'</string>'
})