2.0.3 • Published 7 years ago

gulp-java-merger v2.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Gulp Java Merger

npm

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

Install with npm.

npm install --save-dev gulp-java-merger

Example

var merge = require('gulp-java-merger');

gulp.task('default', function() {
    gulp.src('input/*.java')
        .pipe(merge('merged.java', {
            publicMain: true
        }))
        .pipe(gulp.dest('output/')); 
});

Usage

merge(fileName, options)

  • fileName: The name of the generated file.
  • options
    • publicMain (default: false): Make all classes containing a public static void main method public.
    • removePackage (default: 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.

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago