Tutorial by Examples: archives

You can use the archivesBaseName to set the name of apk. For example: defaultConfig { .... project.ext.set("archivesBaseName", "MyName-" + defaultConfig.versionName); } You will obtain this output. MyName-X.X.X-release.apk
To create new archive open zipfile with write mode. import zipfile new_arch=zipfile.ZipFile("filename.zip",mode="w") To add files to this archive use write() method. new_arch.write('filename.txt','filename_in_archive.txt') #first parameter is filename and second parameter i...
With a simple for loop, all zip archives in a directory can be extracted. for (i in dir(pattern=".zip$")) unzip(i) The dir function produces a character vector of the names of the files in a directory matching the regex pattern specified by pattern. This vector is looped through w...

Page 1 of 1