From d8bb6b443a0f8685d23b84d3d5f5616859afec08 Mon Sep 17 00:00:00 2001 From: wql Date: Sat, 6 Dec 2025 15:19:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=20windows=20=E7=8E=AF=E5=A2=83=E4=B8=8Bfix?= =?UTF-8?q?=5Fissue=5F1263.gradle=20=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buildScripts/gradle/fix_issue_1263.gradle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/buildScripts/gradle/fix_issue_1263.gradle b/buildScripts/gradle/fix_issue_1263.gradle index c039a01bc..f0152c29a 100644 --- a/buildScripts/gradle/fix_issue_1263.gradle +++ b/buildScripts/gradle/fix_issue_1263.gradle @@ -58,10 +58,11 @@ def copyApkAfterTask(t) { def outputFile = metadata.getJSONArray("elements").getJSONObject(0).getString("outputFile") def apkFile = new File(metadataFile.parentFile, outputFile) def testRelativePath = redirectFile.relativePath(apkFile) - def needCopy = !testRelativePath.matches("^(\\.\\.${File.separatorChar})+outputs${File.separatorChar}.+") + def separator = java.util.regex.Pattern.quote(File.separator) + def needCopy = !testRelativePath.matches("^(\\.\\.${separator})+outputs${separator}.+") if (needCopy) { def matchPath = new File("/build/intermediates").toPath().toString() - def intermediatesDir = new File(apkFile.toPath().normalize().toString().find("^.+?$matchPath")) + def intermediatesDir = new File(apkFile.toPath().normalize().toString().find('^.+?' + java.util.regex.Pattern.quote(matchPath))) def outputsDir = new File(intermediatesDir.parentFile, "outputs") def r = copy { from intermediatesDir