Skip to content
roosit edited this page May 9, 2026 · 6 revisions

Velitask plugin-example - wiki

Русский

Documentation for plugin-example, a minimal working template of a plugin for Velitask. One example indicator (a speedometer), an entry point, its own DB smoke test, localization, SVG assets: everything a real plugin has, but in the most compact form. The idea is to fork it and adapt it for your project.

This wiki is a technical description of this exact template: how the entry point is organized, how the speedometer is implemented, which resources exist and why. It is not a tutorial on "how to write your own plugin from scratch"; for that, read SDK Quick Start and Plugin Architecture.

I want my own plugin

Two paths:

  • Fork this repo (recommended) - the fastest start. Fork plugin-example, change the UID (com.velitask.plugin.example -> yours), rename the package, rewrite the speedometer for your own indicator or add new ones next to it. Build ./gradlew jar -> ready to install.
  • From scratch using the SDK tutorial - if you want to understand the structure deeply. Read SDK Quick Start, then Plugin Architecture, then use this template as a reference.

Send a ready PR with a template improvement. We review reasonable proposals.

Community

Chats, channels, discussions are on velitask.com, in the community section with current links (Telegram and others).

Bugs and feature requests for this template: GitHub Issues.

Plugin contents

This template intentionally has one indicator so the code is easy to read. A full-featured example with a dozen indicators and analytics is plugin-official.

Class What it is
Plagin IPlagin entry point. Registers the UID, version, locales, the single indicator, its own SQLite DB (PluginDatabase API smoke test); the onSourceImported hook writes the import log.
SpeedometerIndicator Circular speedometer with an arrow and a number. SVG graphics with configurable colors, four scales (40/80/160/320 km/h), two skins (night, racing). The reference "SVG-driven" indicator.

Resources

The files in the plugin's src/main/resources/ (SQL migration for the plugin DB, localization, speedometer SVG graphics) are described on the Resources page.

How to read Code/

Each Java class of the plugin has a corresponding page in Code/ with the full source and a detailed breakdown: what each field stores, what contract each method has, what the render cycle looks like, and what the pitfalls are. The production code in src/main/java/... is intentionally clean (without JavaDoc and comments); the whole description lives here in the wiki as a "book about the code".

Useful links

Clone this wiki locally