Skip to content

Commit

Permalink
Merge pull request #1721 from player-03/escaped-characters
Browse files Browse the repository at this point in the history
Only escape backslashes in Android SDK/NDK paths. The others don't need to be escaped in .properties files, and shouldn't be escaped in .gradle files.
  • Loading branch information
player-03 authored Oct 25, 2023
2 parents 1a3a9bd + d931869 commit a6aad10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,8 @@ class AndroidPlatform extends PlatformTarget
context.ANDROID_BUILD_TOOLS_VERSION = AndroidHelper.getBuildToolsVersion(project);
}

var escaped = ~/([ #!=\\:])/g;
context.ANDROID_SDK_ESCAPED = escaped.replace(context.ENV_ANDROID_SDK, "\\$1");
context.ANDROID_NDK_ROOT_ESCAPED = escaped.replace(context.ENV_ANDROID_NDK_ROOT, "\\$1");
context.ANDROID_SDK_ESCAPED = StringTools.replace(context.ENV_ANDROID_SDK, "\\", "\\\\");
context.ANDROID_NDK_ROOT_ESCAPED = StringTools.replace(context.ENV_ANDROID_NDK_ROOT, "\\", "\\\\");

if (Reflect.hasField(context, "KEY_STORE")) context.KEY_STORE = StringTools.replace(context.KEY_STORE, "\\", "\\\\");
if (Reflect.hasField(context, "KEY_STORE_ALIAS")) context.KEY_STORE_ALIAS = StringTools.replace(context.KEY_STORE_ALIAS, "\\", "\\\\");
Expand Down

0 comments on commit a6aad10

Please sign in to comment.