.klyx bundle.
The Klyx Gradle plugin
Apply theio.github.klyx-dev.plugin plugin in your app/build.gradle.kts:
build.gradle.kts
Configuration options
Auto-detected files
The plugin automatically detects and includes these files from the project root:Build tasks
The plugin adds three Gradle tasks:Bundle format
The task produces a.klyx file — a gzipped tarball containing:
Dependencies
Theklyx-api dependency must be compileOnly:
implementation would bundle the API into your APK and cause conflicts.
R8 / ProGuard
If you enable minification, you must keep your entry class:keepRules/rules.keep file that the klyx {} block picks up automatically. You can also put rules in consumer-rules.pro and reference them in your build file:
AndroidManifest
Keep it minimal:plugin.json.
Version compatibility
TheminAppVersion in plugin.json should match the version of klyx-api you’re compiling against:
minAppVersion in plugin.json:
Publishing to the registry
Klyx hosts a community plugin registry at github.com/klyx-dev/plugins. Publishing is done through a pull request — CI validates your bundle and publishes it automatically on merge.Prerequisites
- Your
plugin.jsonis valid (see manifest reference for required fields) - You have built a
.klyxbundle with./gradlew klyxBundle
Publish via pull request
- Fork the registry repo
- Add your
.klyxfile to theincoming/directory - Create a pull request to
main - Wait for CI — the workflow validates your bundle and posts results as a PR comment
- Merge once validation passes — your plugin is published automatically
What CI validates
The registry’s CI pipeline checks:plugin.jsonexists and is valid JSON- All required fields are present and non-empty:
id,version,name,minAppVersion,entryClass idmatches the format: starts with a letter, contains only letters, digits, and dots, no slashesversionfollows semver (e.g.,1.0.0)minAppVersionandmaxAppVersionfollow semverentryClassis a valid fully-qualified class nameauthor.nameis present ifauthoris an objectplugin.apkexists in the bundle- Ownership: You can only publish updates to a plugin you already own. First-time publishers are welcome for new plugin IDs
After publishing
Thepublish workflow:
- Creates a directory under
plugins/{plugin-id}/with all versioned bundles and extracted metadata - Updates
plugins/index.json— the auto-generated registry index - Clears the
incoming/directory
Registry structure
Ownership
When you first publish a plugin, you become its owner. Only the registered owner can publish updates to that plugin ID. This prevents namespace squatting and unauthorized updates.Manual distribution
You can also share.klyx files directly with users. They can open the file with Klyx to install the extension.