mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
quick-e2e: update plugin file copying logic and add directory creation
This commit is contained in:
@@ -40,12 +40,15 @@ public class Main {
|
||||
startScript.writeStartScript(context);
|
||||
|
||||
GradleService gradle = new GradleService();
|
||||
// gradle.runTask(":plugins:fancynpcs:shadowJar");
|
||||
// gradle.runTask(":plugins:fancyholograms:shadowJar");
|
||||
// gradle.runTask(":plugins:fancyvisuals:shadowJar");
|
||||
|
||||
CopyFileService copyFile = new CopyFileService();
|
||||
copyFile.copyFile(context, "plugins/fancyholograms/build/libs", "FancyHolograms-.*\\.jar", "plugins");
|
||||
copyFile.copyFile(context, "plugins/fancyvisuals/build/libs", "FancyVisuals-.*\\.jar", "plugins");
|
||||
copyFile.createDirectory(context, "plugins");
|
||||
copyFile.copyFile(context, "plugins/fancynpcs/build/libs", "FancyNpcs-.*\\.jar", "plugins/FancyNpcs.jar");
|
||||
copyFile.copyFile(context, "plugins/fancyholograms-v2/build/libs", "FancyHolograms-.*\\.jar", "plugins/FancyHolograms.jar");
|
||||
copyFile.copyFile(context, "plugins/fancyvisuals/build/libs", "FancyVisuals-.*\\.jar", "plugins/FancyVisuals.jar");
|
||||
|
||||
StartServerService startServer = new StartServerService();
|
||||
startServer.startServer(context);
|
||||
|
||||
@@ -29,7 +29,7 @@ public class CopyFileService {
|
||||
}
|
||||
}
|
||||
|
||||
Path target = context.serverEnvPath().resolve(destination + "/" + Path.of(realSource).getFileName());
|
||||
Path target = context.serverEnvPath().resolve(destination);
|
||||
|
||||
try {
|
||||
Files.copy(Path.of(realSource), target, StandardCopyOption.REPLACE_EXISTING);
|
||||
@@ -37,4 +37,13 @@ public class CopyFileService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void createDirectory(Context context, String directory) {
|
||||
Path path = context.serverEnvPath().resolve(directory);
|
||||
try {
|
||||
Files.createDirectories(path);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user