cleanup
This commit is contained in:
parent
5b03fe6cfd
commit
f251e9112e
@ -9,11 +9,3 @@ dependencies {
|
||||
implementation(project(":prometeu-compiler:prometeu-frontend-api"))
|
||||
implementation(project(":prometeu-compiler:prometeu-frontend-registry"))
|
||||
}
|
||||
|
||||
tasks.register<JavaExec>("runCompile") {
|
||||
group = "application"
|
||||
description = "Runs p.studio.compiler.Compile against test-projects/main."
|
||||
classpath = sourceSets.main.get().runtimeClasspath
|
||||
mainClass = "p.studio.compiler.Compile"
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
package p.studio.compiler;
|
||||
|
||||
import p.studio.compiler.messages.BuilderPipelineConfig;
|
||||
import p.studio.compiler.models.BuilderPipelineContext;
|
||||
import p.studio.compiler.workspaces.BuilderPipelineService;
|
||||
import p.studio.utilities.PConstants;
|
||||
import p.studio.utilities.logs.LogAggregator;
|
||||
|
||||
public class Compile {
|
||||
public static void main(String[] args) {
|
||||
final var logAggregator = LogAggregator.stdout();
|
||||
final var config = new BuilderPipelineConfig(false, "test-projects/%s".formatted(PConstants.PROJECT));
|
||||
final var context = BuilderPipelineContext.fromConfig(config);
|
||||
BuilderPipelineService.INSTANCE.build(context, logAggregator);
|
||||
}
|
||||
}
|
||||
@ -5,13 +5,5 @@ plugins {
|
||||
dependencies {
|
||||
implementation(project(":prometeu-infra"))
|
||||
implementation(project(":prometeu-packer:prometeu-packer-api"))
|
||||
implementation("org.apache.tika:tika-core:3.2.1")
|
||||
}
|
||||
|
||||
tasks.register<JavaExec>("runPackMain") {
|
||||
group = "application"
|
||||
description = "Runs p.packer.PackMain against test-projects/main."
|
||||
classpath = sourceSets.main.get().runtimeClasspath
|
||||
mainClass = "p.packer.PackMain"
|
||||
workingDir = rootDir
|
||||
implementation("org.apache.tika:tika-core:3.2.2")
|
||||
}
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
package p.packer;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import p.packer.messages.PackWorkspaceRequest;
|
||||
import p.packer.messages.PackerOperationStatus;
|
||||
import p.packer.messages.PackerProjectContext;
|
||||
import p.studio.utilities.PConstants;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public final class PackMain {
|
||||
private PackMain() {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
final Path projectRoot = args.length == 0
|
||||
? Path.of("test-projects/%s".formatted(PConstants.PROJECT))
|
||||
: Path.of(args[0]);
|
||||
final String projectId = projectRoot.getFileName() == null
|
||||
? "project"
|
||||
: projectRoot.getFileName().toString();
|
||||
|
||||
try (var packer = Packer.bootstrap(new ObjectMapper(), event -> { })) {
|
||||
final var result = packer.workspaceService().packWorkspace(
|
||||
new PackWorkspaceRequest(new PackerProjectContext(projectId, projectRoot)));
|
||||
System.out.println(result.summary());
|
||||
if (result.status() != PackerOperationStatus.SUCCESS) {
|
||||
throw new IllegalStateException("pack failed with status: " + result.status());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user