Skip to content

Commit 6182332

Browse files
committed
Added some stuff...
1 parent af9f686 commit 6182332

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/mangorage/mangobotgradle/tasks/RunBotTask.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
import javax.inject.Inject;
99
import java.util.ArrayList;
10+
import java.util.Arrays;
11+
import java.util.List;
1012

1113
public abstract class RunBotTask extends JavaExec {
1214
@Inject
@@ -28,9 +30,12 @@ public RunBotTask(RunConfig runConfig) {
2830
// Create your module path from the config
2931
FileCollection modulePath = getProject().getConfigurations().getByName("bootstrap");
3032

33+
3134
setClasspath(modulePath); // EMPTY CLASSPATH, this is MODULE mode
3235
getMainClass().set("org.mangorage.bootstrap.Bootstrap");
3336
getMainModule().set("org.mangorage.bootstrap");
3437
getModularity().getInferModulePath().set(true);
38+
39+
setJvmArgs(List.of("--add-modules", "java.scripting"));
3540
}
3641
}

0 commit comments

Comments
 (0)