Repository navigation
EN Developer
Documentation for plugin-example — the minimal working template of a plugin for Velitask. It contains one example indicator (a speedometer), an entry point, the plugin's own database, localization and SVG graphics: everything a real plugin has, but in the most compact form. The idea is to fork the template and adapt it to your project.
This wiki is a technical description of this particular template: how the entry point is built, how the speedometer is made, which resources are needed and why. It is not a tutorial on "how to write a plugin from scratch": for that, read the SDK wiki — Introduction and Build and connect.
Two ways:
-
Fork this repository (recommended). Fork
plugin-example, change theUID(com.velitask.plugin.example) and the key prefixKEYin Plagin, rename the package if needed (and updateVelitask-Plugin-Classinbuild.gradle), rewrite the speedometer into your own indicator or add new ones next to it. The./gradlew jarcommand builds the plugin jar. - From scratch following the SDK guide. Read the Introduction and Build and connect, and use this template as a reference.
Feel free to send a ready pull request that improves the template: we consider reasonable proposals.
Chats, channels and discussions are on velitask.com, in the community section with up-to-date links. Bugs and wishes for the template go to GitHub Issues.
The template deliberately has one indicator, so the code is easy to read. A full-featured example with many indicators is plugin-official.
| Class | JSON | What it is |
|---|---|---|
| Plagin | — | The plugin entry point: identifier, version, database version, additional languages, the list of indicators and the onSourceImported hook, which writes an import record to the plugin's table. |
| SpeedometerIndicator | JSON | A circular speedometer with a needle and a number. SVG graphics with configurable colors, four scales (40, 80, 160, 320 km/h), two skins: night and racing. |
The files from src/main/resources/ — the plugin's database schema, localization and the speedometer SVG graphics — are described on the Resources page.
Each Java class of the plugin has a page with the full source and a walkthrough: what a field stores, what a method does, the rendering order, the limitations. The production code in src/main/java/... is intentionally clean — no JavaDoc and no comments; the explanations live in the wiki, as short comments inside the code block and in the text below it. Reading order: Plagin, then SpeedometerIndicator.
The format in which an indicator is saved in a project and in a template is described on the SpeedometerIndicator JSON page.
- plugin-example indicators — what an indicator shows and which settings are available in the interface.
- Indicator JSON templates — how to assemble a JSON template by hand.
- README — quick start, build and installation.
- SDK wiki — concepts and the plugin development guide.
-
plugin-official— a full-featured plugin, a larger example.