Skip to content

Commit

Permalink
[sarlc] All the modules are loaded through then Bootique dynamic load…
Browse files Browse the repository at this point in the history
…ing feature.

Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Jul 24, 2018
1 parent 86af7ed commit 6e4b335
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
Expand Up @@ -35,15 +35,6 @@
import org.apache.log4j.Logger;

import io.sarl.lang.SARLStandaloneSetup;
import io.sarl.lang.sarlc.modules.commands.CompilerCommandModuleProvider;
import io.sarl.lang.sarlc.modules.commands.VersionCommandModuleProvider;
import io.sarl.lang.sarlc.modules.configs.CompilerConfigModuleProvider;
import io.sarl.lang.sarlc.modules.configs.SarlcConfigModuleProvider;
import io.sarl.lang.sarlc.modules.configs.ValidatorConfigModuleProvider;
import io.sarl.lang.sarlc.modules.general.SARLRuntimeModuleProvider;
import io.sarl.lang.sarlc.modules.general.SarlBatchCompilerModuleProvider;
import io.sarl.lang.sarlc.modules.general.SarlcApplicationModuleProvider;
import io.sarl.lang.sarlc.modules.general.SarlcDefaultCommandModuleProvider;

/** Class that implements the standard main function for running a SARL application
* with bootique modules.
Expand All @@ -64,21 +55,7 @@ public class BootiqueSarlcMain {
@SuppressWarnings("static-method")
protected BQRuntime createRuntime(String... args) {
SARLStandaloneSetup.doPreSetup();
Bootique bootique = Bootique.app(args);
// Configuration modules
bootique.module(new SarlcConfigModuleProvider())
.module(new CompilerConfigModuleProvider())
.module(new ValidatorConfigModuleProvider());
// Command modules
bootique.module(new VersionCommandModuleProvider())
.module(new CompilerCommandModuleProvider());
// Core modules
bootique.module(new SARLRuntimeModuleProvider())
.module(new SarlBatchCompilerModuleProvider())
.module(new SarlcDefaultCommandModuleProvider())
.module(new SarlcApplicationModuleProvider());
bootique = bootique.autoLoadModules();
final BQRuntime runtime = bootique.createRuntime();
final BQRuntime runtime = Bootique.app(args).autoLoadModules().createRuntime();
SARLStandaloneSetup.doPostSetup(runtime.getInstance(Injector.class));
return runtime;
}
Expand Down
@@ -0,0 +1,9 @@
io.sarl.lang.sarlc.modules.configs.SarlcConfigModuleProvider
io.sarl.lang.sarlc.modules.configs.CompilerConfigModuleProvider
io.sarl.lang.sarlc.modules.configs.ValidatorConfigModuleProvider
io.sarl.lang.sarlc.modules.commands.VersionCommandModuleProvider
io.sarl.lang.sarlc.modules.commands.CompilerCommandModuleProvider
io.sarl.lang.sarlc.modules.general.SARLRuntimeModuleProvider
io.sarl.lang.sarlc.modules.general.SarlBatchCompilerModuleProvider
io.sarl.lang.sarlc.modules.general.SarlcDefaultCommandModuleProvider
io.sarl.lang.sarlc.modules.general.SarlcApplicationModuleProvider

0 comments on commit 6e4b335

Please sign in to comment.