Skip to content

ArexLabs/aurorabuild

Repository files navigation

AuroraBuild

A modern Java build system written in Go — fast, deterministic, cloud-native.

AuroraBuild is a hybrid platform matching the speed of modern web tooling with the enterprise stability of Java. The CLI is written in Go, and the heavy-lifting incremental persistence engine and build planner is powered by aurorad, a custom high-performance daemon written in Rust.

Think: Cargo for Java. Bun for Java builds.


Quick Start

# Create a new project
aurora init my-project
cd my-project

# Build and run
aurora build
aurora run

# Run tests
aurora test

# Package as JAR
aurora package

# Build a native-image (requires GraalVM)
aurora native

# Check your environment
aurora doctor

Installation

go install github.com/aurorabuild/aurorabuild/cli/cmd/aurora@latest

Or build from source:

git clone https://github.com/aurorabuild/aurorabuild
cd aurorabuild
go build ./cli/cmd/aurora
sudo mv aurora /usr/local/bin/

Requirements:

  • Go 1.22+ (to build)
  • JDK 21+ with javac and java on PATH (or JAVA_HOME set)
  • GraalVM (optional, for aurora native)

Commands

Command Description
aurora build Compile sources, resolve deps, produce class files
aurora test Run tests via JUnit Platform
aurora run Build and execute the main class
aurora package Package into a deterministic JAR
aurora clean Remove build artifacts
aurora init Scaffold a new project
aurora native Build a GraalVM native-image
aurora doctor Diagnose toolchain and environment
aurora migrate maven Migrate from Maven
aurora migrate gradle Migrate from Gradle
aurora ui Launch the desktop UI (experimental)
aurora version Print version
aurora --version Print version (short flag)

Configuration

AuroraBuild uses a single YAML file (aurora.yaml):

project:
  name: my-app
  version: 1.0.0
  group: com.example
  mainClass: com.example.App

java:
  source: 21
  target: 21
  srcDir: src/main/java
  testDir: src/test/java
  outDir: target/classes

repositories:
  - name: mavenCentral

dependencies:
  - group: org.junit.jupiter
    artifact: junit-jupiter-api
    version: 5.10.0
    scope: test

tasks:
  generate:
    run: protoc --java_out=src/generated proto/*.proto

hooks:
  beforeBuild:
    - run: echo "pre-build hook"
  afterBuild:
    - run: echo "post-build hook"

Migration

From Maven

cd my-maven-project
aurora migrate maven pom.xml

Parses pom.xml, migrates dependencies, repositories, Java version, and generates aurora.yaml + aurora.lock.

From Gradle

cd my-gradle-project
aurora migrate gradle build.gradle

Parses build.gradle (or .kts), migrates dependencies, plugins, Java toolchain config.

Both support --dry-run for analysis without file generation.

Lockfiles

AuroraBuild uses aurora.lock for reproducible builds:

aurora build --frozen

The lockfile contains exact resolved versions, SHA256 hashes, and the full transitive graph. Frozen mode enforces lockfile versions and validates checksums.

Architecture

cli/                    # Go CLI (entry point)
├── cmd/aurora/
│   ├── main.go         # Binary entry
│   └── commands/       # Cobra command tree
├── internal/
│   ├── build/          # Build orchestration
│   ├── deps/           # Dependency resolution
│   ├── http/           # HTTP transport
│   ├── repository/     # Repository abstraction
│   ├── project/        # Project model + config parser
│   ├── lockfile/       # Lockfile management + validation
│   ├── incremental/    # Incremental compilation tracking
│   ├── state/          # Persistent build state
│   ├── repro/          # Reproducible build utilities
│   ├── test/           # Test execution abstraction
│   ├── migrate/        # Migration engine
│   ├── tasks/          # Declarative task executor
│   ├── templates/      # Project scaffolding templates
│   └── version/        # Version metadata
└── go.mod

daemon/                 # Rust incremental daemon (aurorad)
├── Cargo.toml
└── crates/
    ├── aurorad/        # Rust incremental daemon entry
    ├── graph/          # Dependency graph computation
    ├── planner/        # Rebuild planning
    ├── incremental/    # Incremental state tracker
    ├── cache/          # Persistent memory caches
    ├── watcher/        # File watcher debouncer
    ├── devserver/      # Development server
    ├── ipc/            # MessagePack IPC
    ├── scheduler/      # Parallel task scheduler
    ├── compiler/       # Daemon javac wrapper
    └── abi/            # ABI hashing for partial rebuilds

Key Features

Transitive Dependency Resolution

Full Maven-compatible dependency graph resolution:

  • POM XML parsing with parent resolution
  • Recursive transitive dependency walk
  • Cycle detection (DFS with white/gray/black marking)
  • Pluggable conflict strategies (nearest-wins, highest-version)
  • Exclusion support, optional dependency filtering
  • Scope propagation (test/provided scopes don't leak)

Reproducible Builds

  • Deterministic JARs: sorted entries, normalized timestamps (zip epoch), stable manifest
  • SHA256 verification: every dependency checksummed end-to-end
  • Lockfile: aurora.lock pins exact versions, hashes, and repository sources
  • Frozen mode: aurora build --frozen enforces lockfile fidelity

Incremental Compilation (aurorad Rust Daemon)

Aurora uses aurorad, a persistent background daemon written in Rust, maintaining full in-memory states of your application's Source Graph and Dependency Graph.

  • Instantly reacts to FileSystem events using notify.
  • ABI Awareness: Changes that do not alter the public ABI (abi hashing) prevent down-stream consumers from executing useless recompilation.
  • Extremely parallel task scheduler via tokio.
  • High-speed IPC overhead via MessagePack over Named Pipes / Domain Sockets.

Concurrent Build Pipeline

  • Parallel dependency downloads
  • Worker pool with bounded concurrency
  • Pipeline stages with structured concurrency
  • Context propagation for cancellation
  • Task graph with dependency-aware scheduling

Cloud-Native + GraalVM

  • aurora native for native-image builds
  • Container-aware defaults
  • Minimal CI mode
  • Fast cold starts (no JVM bootstrap)
  • aurora doctor validates Java, GraalVM, and toolchain

Declarative Tasks

No scripting DSL. Tasks are declarative YAML:

tasks:
  generate:
    run: protoc --java_out=src/generated proto/*.proto
    inputs: ["proto/*.proto"]
    outputs: ["src/generated"]

hooks:
  beforeBuild:
    - run: make generate

Desktop UI

A lightweight web-based UI (opt-in via aurora ui) for project inspection, build visualization, and environment diagnostics. Starts instantly — no Electron, no heavyweight runtime.

aurora ui
# -> http://localhost:8700

Project Layout

project/
├── aurora.yaml          # Build configuration
├── aurora.lock          # Dependency lockfile
├── src/main/java/       # Sources
├── src/test/java/       # Tests
└── target/              # Build outputs

Comparison

Feature AuroraBuild Maven Gradle
Binary size ~15MB static ~10MB + JVM ~100MB + JVM
Cold start <10ms ~2-5s (JVM) ~3-8s (daemon)
Config format YAML XML Groovy/Kotlin DSL
Scripting None None Full DSL
Plugin system None (extensible via tasks) XML plugins Plugin ecosystem
Dependency resolution Maven-compatible Native Native
Lockfile aurora.lock None gradle.lockfile
GraalVM support Native Manual Manual
UI Built-in web UI None Build scans
Migration from Built-in

Release Tooling

Aurora includes a full Python-based release pipeline in tools/ for automated builds, packaging, and installer generation.

Prerequisites

  • Python 3.12+
  • Go 1.22+ (auto-installed by bootstrap)
  • WiX Toolset (Windows MSI builds only)

Tools Overview

tools/
├── bootstrap.py       # Environment setup, Go auto-install
├── build.py           # Compile Aurora (release, debug, cross-compile)
├── package.py         # Create distributable archives (zip, tar.gz)
├── installer.py       # Generate Windows MSI via WiX
├── release.py         # Full release pipeline orchestration
├── version.py         # Semantic versioning from git tags
├── env.py             # OS/arch/Go detection
├── utils/
│   ├── logging.py     # Structured color-coded logging
│   ├── process.py     # Safe subprocess execution
│   ├── filesystem.py  # File operations
│   ├── download.py    # HTTP downloads with checksums
│   └── hashing.py     # SHA256/checksum utilities
└── templates/wix/     # WiX MSI installer templates

Bootstrap

python tools/bootstrap.py

Detects OS, architecture, and Go installation. If Go is missing or outdated, downloads and installs it automatically to .cache/go-VERSION/. Verifies all required tooling and creates build directories.

Supports CI=true for machine-readable output in CI pipelines.

Build

# Release build (optimized, stripped)
python tools/build.py

# Debug build (with symbols)
python tools/build.py --debug

# Cross-compile for all platforms
python tools/build.py --cross

# Cross-compile for specific targets
python tools/build.py --target linux arm64 --target windows amd64

Output: build/aurora (or build/aurora.exe on Windows)

Version metadata is injected at compile time via -ldflags -X from tools/version.py.

Package

# Package all binaries in build/
python tools/package.py

# Package a specific binary
python tools/package.py build/aurora

# Generate SHA256SUMS
python tools/package.py --checksums

Produces reproducible archives (sorted entries, zero timestamps) in dist/VERSION/.

Windows Installer

# Requires WiX Toolset on Windows
python tools/installer.py build/aurora.exe

Generates build/aurora-VERSION.msi that:

  • Installs to C:\Program Files\Aurora\
  • Adds aurora to system PATH (optional)
  • Creates Windows uninstall entries
  • Generates a desktop shortcut (optional)
  • Generates a Start Menu Shortcut (optional)
  • Multi-step wizard with feature selection (desktop shortcut, start menu, PATH)
  • Includes the Apache 2.0 Graphic Installer License Agreement
  • Supports upgrades via stable UpgradeCode

Release Pipeline

# Full release (bootstraps, builds, packages, generates installer)
python tools/release.py

# Dry run
python tools/release.py --dry-run

# Skip specific steps
python tools/release.py --skip bootstrap installer

# Generate just the release manifest
python tools/release.py --manifest-only

Outputs to dist/VERSION/:

aurora-VERSION-linux-amd64.tar.gz
aurora-VERSION-linux-amd64.zip
aurora-VERSION-windows-amd64.zip
aurora-VERSION-windows-amd64.msi
aurora-VERSION-darwin-amd64.tar.gz
aurora-VERSION-darwin-arm64.tar.gz
SHA256SUMS
release.json

Version Management

python tools/version.py version        # Current version (from git tag)
python tools/version.py release        # Release version (no dev suffix)
python tools/version.py commit         # Current git commit
python tools/version.py metadata       # Full build metadata (JSON)
python tools/version.py bump-patch     # Bump patch version

Version follows semver from git tags (v1.0.0, v1.1.0-beta.1).

CI/CD

The .github/workflows/ directory contains:

  • ci.yml — Runs on every push/PR: Go build, tests, lint, Python tools validation
  • release.yml — Triggered by v* tags: cross-platform builds, packaging, MSI generation, GitHub Release

Development

git clone https://github.com/aurorabuild/aurorabuild
cd aurorabuild

# Build (Go)
go build ./cli/cmd/aurora

# Build (Python toolchain)
python tools/build.py

# Test
go test ./cli/...

# Run
./aurora build -f example/aurora.yaml

License

Apache 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors