The Gradle OS Package plugin builds native Linux packages (RPM and DEB) directly from your project, enabling repeatable, policy-compliant server distributions. It lets you define metadata like package name, version, dependencies, and maintainers, then map files from your build into filesystem locations with ownership and permissions. Pre-, post-install, and removal scripts are supported so services can be registered, caches warmed, or config migrated during upgrades. The plugin fits naturally in multi-module builds and CI, producing artifacts that ops teams can promote through repositories like APT or YUM. It’s widely used to package JVM applications along with their configs, systemd units, and logs into a single deployable unit. By codifying packaging alongside source, it closes the gap between dev and ops and makes releases auditable and consistent.
Features
- Creates RPM and Debian (DEB) packages via Gradle tasks
- Uses Gradle-style CopySpec for defining package content
- Pure Java implementation; no external native tools required
- Part of the Nebula plugin ecosystem with structured layout
- Latest version 12.1.0
- Simplifies creating system-level installer artifacts for CI/CD