-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask-build-android.py
More file actions
34 lines (26 loc) · 842 Bytes
/
task-build-android.py
File metadata and controls
34 lines (26 loc) · 842 Bytes
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
#!/usr/bin/python
import sys, os, time
import buildutil as utl
start = time.time()
UNITY_PROJ = './TestProject'
BUILD_PATH = os.path.join(UNITY_PROJ, 'Builds')
EXPORT_PROJ = os.path.join(BUILD_PATH, 'android-proj')
BUNDLE_ID = 'com.test.proj'
shared_args = dict(
# unityHome = 'UNITY_HOME_PATH',
unityLog = os.path.join(BUILD_PATH, 'unity.log'),
log = os.path.join(BUILD_PATH, 'build.log'),
)
utl.runTask(utl.INVOKE, shared_args,
projPath = UNITY_PROJ,
calls = [['UnityEditor.PlayerSettings.bundleIdentifier', BUNDLE_ID]])
utl.runTask(utl.BUILD, shared_args,
projPath = UNITY_PROJ,
buildTarget = 'android',
outPath = EXPORT_PROJ,
exp = True)
utl.runTask(utl.PACK_ANDROID, shared_args,
projPath = EXPORT_PROJ,
task = 'assembleRelease')
print('===time passed===')
print(time.time()-start)