public class JkPluginVersionFromGit extends JkPlugin
Modifier and Type | Field and Description |
---|---|
boolean |
autoConfigureProject |
java.lang.String |
commentVersionPrefix |
static java.lang.String |
TAG_TASK_NAME |
boolean |
tagAfterPublish |
java.lang.String |
tagPrefixForVersion |
MANIFEST_BREAKING_CHANGE_URL_ENTRY, MANIFEST_LOWEST_JEKA_COMPATIBLE_VERSION_ENTRY
Modifier | Constructor and Description |
---|---|
protected |
JkPluginVersionFromGit(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. |
void |
configure(JkJavaProject project,
boolean tag)
Configure the specified project to use git version for publishing and tagging the repository.
|
JkGitProcess |
git() |
JkPluginVersionFromGit |
refresh()
version() return is cached to avoid too many git call. |
void |
showVersion() |
boolean |
tagIfDiffers()
Tags git repository and push with the version specified in last git comment.
|
JkVersion |
version()
Gets the current version either from commit message if specified nor from git tag.
|
beforeSetup, getJkClass, help, name, setJekaPluginCompatibilityRange, toString
public static final java.lang.String TAG_TASK_NAME
public java.lang.String commentVersionPrefix
public java.lang.String tagPrefixForVersion
public boolean autoConfigureProject
public boolean tagAfterPublish
protected JkPluginVersionFromGit(JkClass jkClass)
protected void afterSetup()
JkPlugin
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.
afterSetup
in class JkPlugin
public void configure(JkJavaProject project, boolean tag)
tag
- If true, the repository will be tagged right after the project.pubmication.publish()public JkGitProcess git()
public JkVersion version()
public boolean tagIfDiffers()
public JkPluginVersionFromGit refresh()
version()
return is cached to avoid too many git call. Invoke this method to clear version cache.public void showVersion()