Skip to content

Build & Packaging

The package build logic is centralized in buildSrc/ and exposed through the buildPkg Gradle task.

Build a package

bash
gradle clean buildPkg -Ppkg=iflowkit-email

The -Ppkg={packageCode} property is required.

Output:

text
build/libs/{jarName}-{version}.jar

The JAR name and version come from the package manifest.

CPI compatibility settings

The root Gradle build configures CPI-friendly compilation:

SettingValue
Groovy compiler2.4.21
Java toolchain17
Bytecode targetrelease 8

What goes into the package JAR?

When a package is built, iFlowKit assembles a dedicated source set and creates a self-contained JAR.

Compiled classes

The JAR includes compiled classes from:

  • iflowkit/ core runtime sources
  • the selected package under packages/{pkg}/
  • only the plugins declared in package.json
  • only the system service Groovy sources declared in package.json

Included resources

The JAR also includes relevant non-code resources:

  • the package manifest
  • selected system JSON resources
  • selected service assets
  • selected plugin resources

This approach keeps the package focused and avoids bundling unrelated systems or plugins.

Adding a new package

  1. Create a folder under packages/{pkg}/.
  2. Add packages/{pkg}/iflowkit/package.json.
  3. Add packages/{pkg}/iflowkit/Package.groovy with a stable PACKAGE_ID.
  4. Add package code and facade classes.
  5. Build with:
bash
gradle buildPkg -Ppkg={pkg}

For a concrete example, see iflowkit-email.