Our Groovy Development CLI is Open Source

by Christoph on 12.07.2016

In several Java/Groovy projects we use our own light-weight dependency-injection framework and an own development console. Instead of copy-pasting the small code base to use it in another project the code is public on github.com/sandstorm/groovy-development-cli for everyone to use.

Checkout out github.com/sandstorm/groovy-development-cli-hello-world to learn to use it in your own projects.

Features of the Dependency-Injection

If you have a property and annotate it with @Inject the framework assigns an instance at compile time. The parameterless constructor of the target class is used to create an instance. You can annotate target classes with @ScopeSingleton to ensure that the dependency-injection framework creates only one instance.

That's it. It is supposed to be easy to understand, simple to use and sufficient for most of our projects. Cyclic dependencies are not supported by intent. This makes it so light-weight.

Features of the Groovy-Runner

The groovy-runner is a library to create your own development CLI. The core features are the following:

  • created custom commands to run your application or parts of it in dev mode
  • create your own dev– and debugging–commands
  • very fast test execution of all or selected tests
  • wicked fast restarts without process restarts or compilation
  • keep parts of your application state (e.g. sessions) while hot–reloading classes from updated source files

Future Work

  • push last features from local copy–paste code to github.com
  • improve documentation and examples, e.g. how to manage external–dependencies
  • support hot–loading of local dependencies (currently only the main project)