Implement clearAssets for Android when building an .apk.

This commit is contained in:
MAJigsaw77
2025-12-15 16:30:49 -05:00
committed by Hundrec
parent 6c905a59c8
commit 8920d9f992
+11 -3
View File
@@ -1516,14 +1516,14 @@ class Project extends HXProject
var exportPath:Null<String> = app.path ?? "";
// mac target uses `macos` for the export folder instead of `mac`
var platform:String = (!isMacHost() ? System.hostPlatform : 'macos');
var platform:String = (!isMac() ? Std.string(this.target) : 'macos');
var basePath:String = Path.join([exportPath, platform, "bin"]);
var assetsPath:String = "";
switch (platformType)
{
case PlatformType.DESKTOP:
if (isMacHost())
if (isMac())
{
assetsPath = Path.join([basePath, '${this.app.file}.app', "Contents", "Resources", "assets"]);
}
@@ -1531,7 +1531,15 @@ class Project extends HXProject
{
assetsPath = Path.join([basePath, "assets"]);
}
case PlatformType.MOBILE:
if (isAndroid() && !isBundle())
{
assetsPath = Path.join([basePath, "app", "src", "main", "assets", "assets"]);
}
else
{
return;
}
default:
// Don't do this for other platform types yet.
return;