Skip to content
/ KPB Public

Kotlin Project Builder (KPB) is a tool designed to streamline the process of building Kotlin projects. This is a solution for developers who want to automate and simplify the build process of their Kotlin applications.

Notifications You must be signed in to change notification settings

RafaPear/KPB

Repository files navigation

Kotlin Project Builder (KPB)

Kotlin Project Builder (KPB) is a powerful, multi-module toolkit designed to streamline the scaffolding, creation, and management of Kotlin projects. It empowers developers to generate structured projects, manage dependencies via Version Catalogs, and maintain configuration consistency with ease.

KPB offers both a robust CLI (Command Line Interface) for terminal users and an experimental GUI App (Compose Desktop).

🚀 Features

🛠 Project & Module Management

  • Structured Scaffolding: Initialize new Kotlin projects with best-practice directory structures.
  • Dynamic Modules: Add, remove, and configure modules (e.g., Core, CLI, App, Utils) on the fly.
  • Smart Templates: Apply built-in templates to jumpstart development:
    • Compose Desktop: Ready-to-run desktop application setup.
    • CLI Tools: Standard command-line tool structure.
    • Libraries: Clean setup for Kotlin libraries.
  • File Generation: Inject source code (.kt) and resources directly into modules.

📦 Dependency Management

  • Version Catalog Integration: First-class support for libs.versions.toml. Manage versions, libraries, and plugins centrally.
  • Automated Updates: Add dependencies and plugins through the tool, automatically updating the version catalog.
  • Inter-Module Linking: Easily define dependencies between your project's modules.

💾 Persistence & State

  • Save/Load Configurations: Serialize your entire project state to JSON. Pause and resume your work anytime.
  • Folder-Based Storage: Save project structures to specific folders, including all generated files and configurations.

🔍 Observability

  • Comprehensive Logging: Detailed logs (Console & File) to track every action, ensuring transparency and easier debugging.

📦 Modules Overview

The project is organized into several key modules:

  • kpb-core: The brain of the operation. Contains the domain logic (Project, Module, GradleFile, VersionCatalog), persistence, and the DSL for project composition.
  • kpb-cli: The primary interface. A fully functional interactive command-line tool.
  • kpb-app: (Experimental) A Compose Desktop graphical interface. Currently in early development.
  • kpb-utils: Shared utilities for logging, formatting, audio helpers, and environment management.

⚡ Quick Start

Prerequisites

  • JDK 21+
  • Gradle (Wrapper included)

Installation & Building

Clone the repository and build the project using Gradle:

./gradlew clean build

Artifacts will be generated in build/libs and within each module's build/libs directory.

🖥 Running the CLI (Recommended)

The CLI is the primary way to use KPB currently. It provides an interactive menu system.

java -jar kpb-cli/build/libs/kpb-cli-1.0.1.jar

Once running, follow the on-screen prompts to:

  1. Create a new project.
  2. Add modules and dependencies.
  3. Generate the project files to disk.

🎨 Running the App (Experimental)

Note: The GUI App is currently incomplete and intended for development/testing purposes only.

java -jar kpb-app/build/libs/kpb-app-v1.0.1.jar

🛠 Developing

We welcome contributions! Here are some common tasks:

  • Build: ./gradlew build
  • Test: ./gradlew test
  • Generate Docs: ./gradlew dokkaHtml (Output: build/dokka/html/index.html)

KDoc Standards

Please ensure all public APIs are documented:

  • concise summary.
  • @param and @return descriptions.
  • @throws for expected exceptions.

Generated by Kotlin Project Builder Team

About

Kotlin Project Builder (KPB) is a tool designed to streamline the process of building Kotlin projects. This is a solution for developers who want to automate and simplify the build process of their Kotlin applications.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages