summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-16 23:44:11 +0800
committerruki <[email protected]>2025-12-16 23:44:11 +0800
commit22b299efd13de014023a652bb49f312d4d394c91 (patch)
tree4a463e63c3507979f77c8f30f7f7075bd18311bd
parentdb1900b7a76b6bb59e3780d4377080ef74afa2d7 (diff)
use os.isfile
-rw-r--r--xmake/rules/ndk/install.lua1
-rw-r--r--xmake/rules/ndk/load.lua1
-rw-r--r--xmake/rules/ndk/package.lua3
-rw-r--r--xmake/rules/ndk/run.lua1
-rw-r--r--xmake/rules/ndk/uninstall.lua3
5 files changed, 2 insertions, 7 deletions
diff --git a/xmake/rules/ndk/install.lua b/xmake/rules/ndk/install.lua
index 0aa43e790..ec340ac00 100644
--- a/xmake/rules/ndk/install.lua
+++ b/xmake/rules/ndk/install.lua
@@ -20,7 +20,6 @@
-- imports
--- main entry
function main(target)
local android_sdkdir = target:toolchain("ndk"):config("android_sdk")
diff --git a/xmake/rules/ndk/load.lua b/xmake/rules/ndk/load.lua
index 7700f85e7..3e49d9533 100644
--- a/xmake/rules/ndk/load.lua
+++ b/xmake/rules/ndk/load.lua
@@ -18,7 +18,6 @@
-- @file load.lua
--
--- main entry
function main(target)
-- only for android target
diff --git a/xmake/rules/ndk/package.lua b/xmake/rules/ndk/package.lua
index 076c78217..00142a85f 100644
--- a/xmake/rules/ndk/package.lua
+++ b/xmake/rules/ndk/package.lua
@@ -22,7 +22,6 @@
import("core.project.depend")
import("utils.progress")
--- main entry
function main(target, opt)
local conf = target:extraconf("rules", "android.native_app")
@@ -72,7 +71,7 @@ function main(target, opt)
local resonly_apk = path.join(tmp_path, "res_only.apk")
local androidjar = path.join(android_sdkdir, "platforms", string.format("android-%s", android_sdk_version),
"android.jar")
- assert(os.exists(androidjar), "%s not found", androidjar)
+ assert(os.isfile(androidjar), "%s not found", androidjar)
local aapt_argv = {"package", "-f", "-M", android_manifest, "-I", androidjar, "-F", resonly_apk}
if android_res and not os.emptydir(android_res) then
diff --git a/xmake/rules/ndk/run.lua b/xmake/rules/ndk/run.lua
index b705498d1..657dad4e8 100644
--- a/xmake/rules/ndk/run.lua
+++ b/xmake/rules/ndk/run.lua
@@ -22,7 +22,6 @@
import("core.base.tty")
import("install", {alias = "install_app"})
--- main entry
function main(target)
-- install it first
diff --git a/xmake/rules/ndk/uninstall.lua b/xmake/rules/ndk/uninstall.lua
index 821ce69bd..24564d631 100644
--- a/xmake/rules/ndk/uninstall.lua
+++ b/xmake/rules/ndk/uninstall.lua
@@ -14,11 +14,10 @@
--
-- Copyright (C) 2015-present, Xmake Open Source Community.
--
--- @author keosu
+-- @author ruki
-- @file uninstall.lua
--
--- main entry
function main(target)
local conf = target:extraconf("rules", "android.native_app")