Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions fusioncli/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ dependencies {
}


val mainFusionRepo = layout.projectDirectory.dir("src/main/fusion")

// Bundle the Fusion repository in our jar.
// TODO DRY this WRT runtime
tasks.jar {
into("FUSION-REPO") {
from(mainFusionRepo)
includeEmptyDirs = true
}
}

tasks.jacocoTestCoverageVerification {
violationRules {
rule {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public int execute(PrintWriter out, PrintWriter err)
// Bootstrap the runtime before printing the welcome banner, so
// that we don't do that when there's usage problems.
myTopLevel = runtime().getDefaultTopLevel();
myTopLevel.requireModule("/fusion/private/repl");
myTopLevel.requireModule("/fusion/private/cli/repl");

welcome();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package dev.ionfusion.fusioncli;

import static dev.ionfusion.testing.ProjectLayout.fusionBootstrapDirectory;
import static dev.ionfusion.testing.ProjectLayout.mainRepositoryDirectory;
import static org.junit.jupiter.api.Assertions.assertEquals;

import dev.ionfusion.testing.StdioTestCase;
Expand Down Expand Up @@ -59,6 +60,9 @@ private String[] prependGlobalOptions(String[] commandLine)
join.add("--repositories");
join.add(fusionBootstrapDirectory().toString());

join.add("--repositories");
join.add(mainRepositoryDirectory().toString());

join.addAll(Arrays.asList(commandLine));
return join.toArray(new String[0]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public static Path fusionBootstrapDirectory()
return PROJECT_DIRECTORY.resolve("../runtime/src/main/fusion");
}

public static Path mainRepositoryDirectory()
{
return PROJECT_DIRECTORY.resolve("src/main/fusion");
}

public static Path testRepositoryDirectory()
{
return PROJECT_DIRECTORY.resolve("src/test/fusion");
Expand Down
Loading