Skip to content

Eason0729/mono-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mono-class

A java bundler for CS class. Some weird class only accept single java source file. This tool automate submission process.

How it work

  1. figure out dependency by package keyword.
  2. bundle required dependency(it would import all file even only one is used in an dictionary)
  3. remove comment, visibility(interface visibility is skipped)...

Usage

To bundle an example project:

src
├── CodeGenerator.java
├── Main.java
└── Syntax
    ├── Exportable.java
    ├── PropertyList.java
    ├── Token
    │   ├── ...
    └── Tree
        ├── Diagram.java
        ├── DiagramTest.java
        ├── Property
        │   ├── Argument.java
        │   ├── ...
        ├── PropertyEntry.java
        ├── ...
❯ mono-class src/CodeGenerator.java -o CodeGenerator.java
Bundling all dependency in src/CodeGenerator.java to CodeGenerator.java
Dependency solved
20147 bytes has been written to CodeGenerator.java

Help:

❯ mono-class --help
A bundler for Java

Usage: mono-class [OPTIONS] <FILE>

Arguments:
  <FILE>  Path to source file containing desired class

Options:
  -o, --output <OUTPUT>  output location [default: Output.java]
  -v, --verbose          verbose mode
  -h, --help             Print help
  -V, --version          Print version

About

A java bundler for CS class

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages