From 8270c4f5dd0d3b3b9a653b87415b45e6bae0024e Mon Sep 17 00:00:00 2001 From: deal Date: Fri, 28 Jan 2022 19:51:42 +0800 Subject: [PATCH] Update adxetools.gradle --- .../android/libcocos2dx/adxetools.gradle | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/core/platform/android/libcocos2dx/adxetools.gradle b/core/platform/android/libcocos2dx/adxetools.gradle index 047f3aa528..05898a1df1 100644 --- a/core/platform/android/libcocos2dx/adxetools.gradle +++ b/core/platform/android/libcocos2dx/adxetools.gradle @@ -236,23 +236,10 @@ class adxetools { static String findCMakeFromBinDir(String cmakeVer, String cmakeBin, boolean allowNewerCMake) { def foundCMakeVer = null - String ninjaName = isWindows() ? "ninja.exe" : "ninja" - String ninjaPath = cmakeBin + File.separator + ninjaName + String ninjaPath = cmakeBin + File.separator + isWindows() ? "ninja.exe" : "ninja" if(!new File(ninjaPath).isFile()) { - // check whether ninja in other location and in path - def ninjaInstalled = false - try { - Process proc = Runtime.getRuntime().exec("ninja --version") - proc.waitFor() - - int exitVal = proc.exitValue() - ninjaInstalled = exitVal == 0 - } catch(Exception) { - } - - if (!ninjaInstalled) { - throw new GradleException("Required $ninjaPath exists!") - } + println("The required ninja program is not present in cmake bin dir!") + return null } try {