Files
pommer/readme.md
2025-05-21 19:15:15 +02:00

3.3 KiB
Raw Permalink Blame History

logo image

Pommer is an internal Python tool designed to streamline CI workflow generation for Java/Kotlin projects using Gradle. It scans your project for build files, analyzes project metadata, and generates a Gitea CI workflow along with a local build script for convenience.

🛠️ Now supports Gradle! The Maven-compatible version is maintained on a separate Git branch.


⚠️ Internal Use Only

This tool is for internal use within Gitea only. Do not distribute or share externally.


Features

  • 🔍 Automatic discovery of Gradle (build.gradle / build.gradle.kts) and Maven (pom.xml) projects.
  • 📦 Parses project metadata (artifact ID, group ID, version, Java/Kotlin usage, etc.).
  • 🏗️ Generates a Gitea CI workflow, compatible with multi-module projects.
  • 🧪 Creates a build.sh script for local testing and development.
  • 🎯 Configurable: Target a specific directory or file to process.

Usage

No installation required. Just run with Python 3:

python3 pommer.py

Options

Option Description
-d, --dir Base directory to scan (default: .)
-p, --specific-pom (For Maven only) Path to a specific pom.xml file
Gradle projects are detected automatically by presence of build.gradle/kts.

Examples

  • Scan a specific directory:

    python3 pommer.py --dir path/to/project
    
  • Use a specific Maven POM file (legacy mode):

    python3 pommer.py --specific-pom path/to/pom.xml
    

Output

  • 📄 Gitea Workflow: .gitea/workflows/build.yaml Automates build and artifact upload for all detected Gradle (and Maven, if applicable) projects.

  • 🔧 Build Script: build.sh Simple, local script to build all projects using Gradle or Maven, as detected.


CI/CD Compile Time Notice

⚠️ Slow compile or stuck builds?

  • Installing JDK and setting up the runner can take a while.
  • If it seems stuck on "Downloading JDK 21", be patient and monitor server network usage.
  • No network activity for several minutes? → Try restarting the runner.
  • The final steps ("finishing up") are slow, but usually not broken.
  • Local builds slow? → Itll be even slower on CI/CD.

Requirements

  • Python 3.7+
  • No third-party dependencies (standard library only)

Notes

  • Gradle is now the primary build system supported.
  • Maven support is preserved in the legacy branch.
  • Java/Kotlin support is detected automatically across modules.
  • The workflow always uses the highest JDK version found in the project tree.

Support

Contact rattatwinko help or feature requests.


License

Internal Use Only Not for Distribution