Gulp Java Merger
A gulp plugin to make it easy to merge multiple .java files into one, aswell as automatically removing 'public' from class declarations (one .java file can't have multiple public classes/enumerations/interfaces) and making sure there are no duplicate imports.
Install with npm.
npm install --save-dev gulp-java-merger
var merge = ;gulp;
fileName: The name of the generated file.
false): Make all classes containing a
public static void mainmethod public.
false): Remove the package line on-top of the file.
A few things
- Only works for a single package (i.e. you can't merge two packages into one bundled file).
- Assumes all files have only one class/enum/interface in it (not counting inner classes).
Note that this is not meant for production code. It's originally made to merge Java bot code in CodinGame contests.