Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

[cca]Add the [email protected] for cca #3836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_build(self):
comm.setUp()
app_name = "CIRC"
sample_src_pref = "/tmp/crosswalk-demos/circ"
comm.buildGoogleApp(app_name, sample_src_pref, self)
comm.buildGoogleApp(app_name, sample_src_pref, self, "6.0.0")

if __name__ == '__main__':
unittest.main()
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_build(self):
comm.setUp()
app_name = "Eh"
sample_src_pref = "/tmp/crosswalk-demos/workshop-cca-eh"
comm.buildGoogleApp(app_name, sample_src_pref, self)
comm.buildGoogleApp(app_name, sample_src_pref, self, "6.0.0")

if __name__ == '__main__':
unittest.main()
4 changes: 2 additions & 2 deletions cordova/cordova-sampleapp-android-tests/sampleapp/comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def create(appname, pkgname, mode, sourcecodepath, replace_index_list, self, ext
do_remove(glob.glob(os.path.join(project_root, "www")))
do_copy(sourcecodepath, os.path.join(tool_path, appname, "www"))

def buildGoogleApp(appname, sourcecodepath, self):
def buildGoogleApp(appname, sourcecodepath, self, cordova_android_ver):
os.chdir(tool_path)
if os.path.exists(os.path.join(tool_path, appname)):
print "Existing %s project, try to clean up..." % appname
Expand Down Expand Up @@ -209,7 +209,7 @@ def buildGoogleApp(appname, sourcecodepath, self):
os.chdir(os.path.join(tool_path, appname))

print "Add android platforms to this project --------------> START"
add_android_cmd = "cca platform add android"
add_android_cmd = "cca platform add android@%s" % cordova_android_ver
addstatus = commands.getstatusoutput(add_android_cmd)
self.assertEquals(0, addstatus[0])

Expand Down
6 changes: 3 additions & 3 deletions tools/build/pack_cordova_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def copyCordovaCliApk(app_name, orig_dir, apk_name_arch="armv7", apk_name_mode="

return True

def packGoogleApp(app_name=None):
def packGoogleApp(app_name=None, cordova_android_ver):
project_root = os.path.join(BUILD_ROOT, app_name)
orig_dir = os.getcwd()
buildstatus = commands.getstatusoutput("cca -v")
Expand Down Expand Up @@ -530,7 +530,7 @@ def packGoogleApp(app_name=None):
'</widget>',
' <allow-navigation href="*" />\n</widget>')

add_cmd = "cca platform add android"
add_cmd = "cca platform add android@%s" % cordova_android_ver
if not doCMD(add_cmd, DEFAULT_CMD_TIMEOUT * 2):
os.chdir(orig_dir)
return False
Expand Down Expand Up @@ -858,7 +858,7 @@ def packAPP(app_name=None):
if not packMobileSpec(app_name):
return False
elif checkContains(app_name, "CIRC") or checkContains(app_name, "EH"):
if not packGoogleApp(app_name):
if not packGoogleApp(app_name, "6.0.0"):
return False
else:
if not packSampleApp_cli(app_name):
Expand Down