https://github.com/Carter907/streamline
A simple, lightweight build tool for Java
https://github.com/Carter907/streamline
build-tool java jpms picocli toml4j
Last synced: 3 months ago
JSON representation
A simple, lightweight build tool for Java
- Host: GitHub
- URL: https://github.com/Carter907/streamline
- Owner: Carter907
- License: gpl-3.0
- Created: 2025-01-27T02:25:23.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T19:56:37.000Z (10 months ago)
- Last Synced: 2025-04-23T00:37:04.555Z (9 months ago)
- Topics: build-tool, java, jpms, picocli, toml4j
- Language: Java
- Homepage:
- Size: 2.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Streamline: A Simple, Beginner-Friendly Java Build Tool

Streamline is a beginner-friendly build tool designed to make Java development more accessible by creating a simple abstraction above the [Jdk binary tool suite](https://docs.oracle.com/en/java/javase/23/docs/specs/man/index.html).
As a newcomer to Java, I often struggled with tools like Maven and Gradle, finding them unnecessarily complicated for basic tasks. These tools, while powerful, can be intimidating for beginners due to their inherent complexity. Modern Java build tools were made for enterprise development, and it's time the Java community saw something different.
With Streamline, I aim to strengthen the development experience and make it as simple to use and learn from as possible. Streamline takes its ease of use from build tools of other languages, such as `cargo` for Rust and the `go` command for Golang.
This project intends to follow the principles of transparency, simplicity, and ease of use. Our mission is to create a build tool that can be used in an academic or hobby environment to facilitate learning about simple project management in Java.
It’s important to note that the initial scope of this project is not to serve as a comprehensive build tool. Dependencies will still have to be manually managed. However, Streamline is unopinionated, and because of its transparency, we implore developers to use other open-source tools alongside your project, such as Make, to help facilitate your build environment.
### Key Considerations
- Currently, Streamline does not automatically download and resolve dependencies like traditional build tools.
- Dependencies are placed into a special folder and added to the module path when you want to run or build the project.
- The Java Module Platform System is proritized.
- Modules are a great way to structure your Java project and this project works with them from the ground up.
### Installation
For now, the easiest way to run Streamline is to create a jar file using the gradle task.
\
First, clone the repo.
```
git clone https://github.com/Carter907/streamline.git
```
run the installation.
```
./gradlew install
```
Follow the instructions to run the the `stml` jar.
### Usage
| command | purpose |
| ------- | ------- |
| **init** | Initializes a new project |
| **build** | Compiles the main module of your project |
| **run** | Runs the compiled main module |
| **archive** | Packages your main module to a modular executable jar file |
| **clean** | Removes the directory specified by `outDir` |
**Flags**
- use the `-vb` flag if you want to see the exact jdk binary command invocation for that specific task.
### Getting Started
to create a new project
```sh
stml init
```
cd into the newly created project
have a look at [usage](https://github.com/Carter907/streamline?tab=readme-ov-file#usage) for a list of other commands once you've created your project.
### Project Structure
When you use the `init` command, you create a project with some helpful defaults. This includes the following project structure:
```
├── branch.toml
├── libs
└── src
└── com.example
├── com
│ └── example
│ └── Main.java
└── module-info.java
```
Lets go through each of these paths:
`branch.toml` this is your main project file that specifies all the configuration for your project.
This is the most important file of any sreamline project. You can specify paths to module resolution as well
as the naming of each meaningful directory. You specify where you want your source code modules to be located (the default is `src`).
You also specify the name of the main class (`mainClass` property). This is helpful for bundling your module into a jar.
The default module name is `com.example` this should most likely be changed to whatever module name suits your needs.
The same can be said for the package `com.example`. `com.example` is a traditional default for package naming so it was used here
for convenience.
### The Build File
`branch.toml` is the build file for streamline. You basically just fill out the fields with whatever you want.
### branch.toml
This file specifies certain configuration for your project. Here is an example:
```toml
[project]
name = "welp"
mainClass = "com.example.Main"
[build]
srcDir = "src"
outDir = "build"
[archive]
jarName = "welp"
[modules]
mainModule = "com.example"
modulePath = ["build", "libs"]
```
As you can tell, simplicity is the primary goal for this project. It may seem unnatural at first, but it will be more powerful as other features are added.