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-emailThe -Ppkg={packageCode} property is required.
Output:
text
build/libs/{jarName}-{version}.jarThe JAR name and version come from the package manifest.
CPI compatibility settings
The root Gradle build configures CPI-friendly compilation:
| Setting | Value |
|---|---|
| Groovy compiler | 2.4.21 |
| Java toolchain | 17 |
| Bytecode target | release 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
- Create a folder under
packages/{pkg}/. - Add
packages/{pkg}/iflowkit/package.json. - Add
packages/{pkg}/iflowkit/Package.groovywith a stablePACKAGE_ID. - Add package code and facade classes.
- Build with:
bash
gradle buildPkg -Ppkg={pkg}For a concrete example, see iflowkit-email.