[英]make command is working outside the gradle in android
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
exec {
workingDir './src/main/cpp/'
executable 'cmd'
args "/C"
args "make.exe"
args "-f"
args "swigGenerate.mk"
}
exec {
workingDir './src/main/cpp/'
executable 'cmd'
args "/C"
args "make.exe"
args "-f"
args "swig.mk"
}
}
The above gradle command inside task swigGenerate(dependsOn : "preBuild"), is working on command line when executed with make command, and is not working when the gradle is run. 任务swigGenerate(dependsOn:“ preBuild”)中的上述gradle命令在使用make命令执行时正在命令行上运行,而在运行gradle时则不起作用。
I tried almost everything, need some help with this. 我几乎尝试了所有事情,对此需要一些帮助。
Commenting the args "/C" line is removing the issue and its working properly. 评论args“ / C”行可消除问题,使其正常工作。 But according to cmd MSDN documentation having /c is not a problem.
但是根据cmd,具有/ c的MSDN文档不是问题。 Still wonder why in some systems it works and other it doesn't.
仍然想知道为什么在某些系统中它可以工作而在其他系统中却不能。
Need some insights on this 需要一些见解
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.