[英]Script to build multiple android projects
I have multiple android projects which I want do build, these projects comes in the form of zip files like 7612362T1.zip . 我有多个要构建的Android项目,这些项目以zip文件的形式出现,例如7612362T1.zip 。 I have this gradle script that already decompresses all the projects within directory then I'm trying to build against android libraries but I'm getting errors when I try to execute the android update program.
我有这个gradle脚本,已经解压缩了目录中的所有项目,然后我试图针对android库进行构建,但是当我尝试执行android更新程序时遇到错误。 These projects are created with ADT Eclipse.
这些项目是使用ADT Eclipse创建的。 This is my gradle script.
这是我的gradle脚本。
task buildall {
FileTree tree=fileTree(dir: '.').include('*.zip')
tree.each { File file ->
copy {
from zipTree(file)
into 'projects'
}
}
tree.each { File file ->
exec {
commandLine 'cmd','/c','android','update','project','--name '+file.name.split("\\.")[0],'--target 2 --path projects/'+file.name.split("\\.")[0]
}
}
}
Error: Flag '--name 7612362T1' is not valid for 'update project'. 错误:标志'--name 7612362T1'对'update project'无效。
Maybe try: 也许尝试:
exec {
commandLine 'cmd', '/c', 'android', 'update', 'project', '--name', file.name.split("\\.")[0], '--target', '2', '--path', 'projects/'+file.name.split("\\.")[0]
}
Every command line arg now is passed separately. 现在,每个命令行arg都分别传递。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.