Merge pull request #1790 from player-03/stale_assets

Automatically delete stale assets and dependency files.
This commit is contained in:
player-03
2024-06-04 13:42:31 -04:00
committed by GitHub
7 changed files with 98 additions and 13 deletions

View File

@@ -595,17 +595,17 @@ class AndroidPlatform extends PlatformTarget
{
if (FileSystem.isDirectory(javaPath))
{
System.recursiveCopy(javaPath, sourceSet + "/java", context, true);
recursiveCopy(javaPath, sourceSet + "/java", context, true);
}
else
{
if (Path.extension(javaPath) == "jar")
{
System.copyIfNewer(javaPath, destination + "/app/libs/" + Path.withoutDirectory(javaPath));
copyIfNewer(javaPath, destination + "/app/libs/" + Path.withoutDirectory(javaPath));
}
else
{
System.copyIfNewer(javaPath, sourceSet + "/java/" + Path.withoutDirectory(javaPath));
copyIfNewer(javaPath, sourceSet + "/java/" + Path.withoutDirectory(javaPath));
}
}
}
@@ -618,7 +618,7 @@ class AndroidPlatform extends PlatformTarget
for (library in cast(context.ANDROID_LIBRARY_PROJECTS, Array<Dynamic>))
{
System.recursiveCopy(library.source, destination + "/deps/" + library.name, context, true);
recursiveCopy(library.source, destination + "/deps/" + library.name, context, true);
}
ProjectHelper.recursiveSmartCopyTemplate(project, "android/template", destination, context);

View File

@@ -438,7 +438,7 @@ class HTML5Platform extends PlatformTarget
var name = Path.withoutDirectory(dependency.path);
context.linkedLibraries.push("./" + dependencyPath + "/" + name);
System.copyIfNewer(dependency.path, Path.combine(destination, Path.combine(dependencyPath, name)));
copyIfNewer(dependency.path, Path.combine(destination, Path.combine(dependencyPath, name)));
}
}
}

View File

@@ -862,7 +862,7 @@ class IOSPlatform extends PlatformTarget
fileName = "lib" + fileName;
}
System.copyIfNewer(dependency.path, projectDirectory + "/lib/" + arch + "/" + fileName);
copyIfNewer(dependency.path, projectDirectory + "/lib/" + arch + "/" + fileName);
}
}
}

View File

@@ -633,7 +633,7 @@ class TVOSPlatform extends PlatformTarget
fileName = "lib" + fileName;
}
System.copyIfNewer(dependency.path, projectDirectory + "/lib/" + arch + "/" + fileName);
copyIfNewer(dependency.path, projectDirectory + "/lib/" + arch + "/" + fileName);
}
}
}

View File

@@ -471,7 +471,7 @@ class WebAssemblyPlatform extends PlatformTarget
var name = Path.withoutDirectory(dependency.path);
context.linkedLibraries.push("./" + dependencyPath + "/" + name);
System.copyIfNewer(dependency.path, Path.combine(destination, Path.combine(dependencyPath, name)));
copyIfNewer(dependency.path, Path.combine(destination, Path.combine(dependencyPath, name)));
}
}
}

View File

@@ -286,7 +286,7 @@ class WindowsPlatform extends PlatformTarget
if (StringTools.endsWith(dependency.path, ".dll"))
{
var fileName = Path.withoutDirectory(dependency.path);
System.copyIfNewer(dependency.path, applicationDirectory + "/" + fileName);
copyIfNewer(dependency.path, applicationDirectory + "/" + fileName);
}
}
@@ -1121,7 +1121,7 @@ class WindowsPlatform extends PlatformTarget
var name = Path.withoutDirectory(dependency.path);
context.linkedLibraries.push("./js/lib/" + name);
System.copyIfNewer(dependency.path, Path.combine(destination, Path.combine("js/lib", name)));
copyIfNewer(dependency.path, Path.combine(destination, Path.combine("js/lib", name)));
}
}