Keep rules
veyl.rules format, auto-detect, and recommendations.
Keeps are class or member names that must stay readable so frameworks can load them (Paper main, services, reflection).
Project layout
Files
Auto-detected in the project root (first match wins):
veyl.rulesveyl-keeps.txt.veylkeep
Or set explicitly: Gradle keepFile = file('veyl.rules'), Maven <keepFile>veyl.rules</keepFile>.
Format
# comments
me.example.MyPlugin
me.example.api.**
me.example.Util#helper
keep me.example.MyPlugin
-keep class me.example.MyPlugin| Pattern | Meaning |
|---|---|
com.foo.Bar | Exact class |
com.foo.* | Classes in that package only |
com.foo.** | Package and subpackages |
com.foo.Bar#method | Keep a member name |
DSL keep '…' entries are merged with the file (duplicates removed).
Recommendations
On each job, Veyl inspects the JAR (same engine as veyl recommend) and can log keeps that are not yet covered:
Veyl: recommended keeps not yet configured (3):
-> me.example.MyPlugin (Bukkit plugin main)veyl recommend path\to\app.jar --out veyl.rulesTurn the log off with suggestKeeps = false if needed.
Usually the main class was renamed. Keep the exact class from plugin.yml and re-run veyl recommend.
No. Only names resolved by reflection, configs, or the plugin loader. Most listeners are fine if their class is not loaded by string name.