public abstract class JkPlugin
extends java.lang.Object
JkClass
instance. The relationship is bidirectional :
JkClass
instances can invoke plugin methods and vice-versa.
Therefore plugins can interact with (or load) other plugins from the owning JkClass
instance
(which is a quite common pattern).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MANIFEST_BREAKING_CHANGE_URL_ENTRY
When publishing a plugin, authors can not guess which future version of Jeka will break compatibility.
|
static java.lang.String |
MANIFEST_LOWEST_JEKA_COMPATIBLE_VERSION_ENTRY
Manifest entry containing the lowest Jeka version which is compatible with a plugin.
|
Modifier | Constructor and Description |
---|---|
protected |
JkPlugin(JkClass jkClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterSetup()
Override this method to perform some actions, once the plugin has been setup by
JkClass.setup() method. |
protected void |
beforeSetup()
Override this method to initialize the plugin.
|
protected JkClass |
getJkClass() |
void |
help() |
java.lang.String |
name() |
java.lang.String |
toString() |
public static final java.lang.String MANIFEST_BREAKING_CHANGE_URL_ENTRY
The register is expected to be a simple flat file.
Each row is structured as pluginVersion : jekaVersion
.
The example below means that :
1.2.1.RELEASE : 0.9.1.RELEASE
1.3.0.RELEASE : 0.9.5.M1
public static final java.lang.String MANIFEST_LOWEST_JEKA_COMPATIBLE_VERSION_ENTRY
null
and
running Jeka version is lower then a warning log will be emitted.protected JkPlugin(JkClass jkClass)
public void help()
protected void beforeSetup() throws java.lang.Exception
JkClass.setup()
is invoked.java.lang.Exception
protected void afterSetup() throws java.lang.Exception
JkClass.setup()
method.
Typically, some plugins have to configure other ones (For instance, java plugin configures
scaffold plugin to instruct what to use as a template build class). Those kind of
configuration is better done here as the setup made in JkClass
is likely
to impact the result of the configuration.
java.lang.Exception
public final java.lang.String name()
protected JkClass getJkClass()
public java.lang.String toString()
toString
in class java.lang.Object