diff --git a/build.gradle b/build.gradle index 5a4827c..303d9d4 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'groovy' id 'java-gradle-plugin' id 'com.gradle.plugin-publish' version '0.10.1' - id 'com.widen.versioning' version '0.3.2' + id 'com.widen.versioning' version '0.4.0' } group = 'com.widen.oss' diff --git a/src/main/java/com/widen/versioning/VersioningPlugin.java b/src/main/java/com/widen/versioning/VersioningPlugin.java index 74412d9..fe4dd58 100644 --- a/src/main/java/com/widen/versioning/VersioningPlugin.java +++ b/src/main/java/com/widen/versioning/VersioningPlugin.java @@ -5,14 +5,17 @@ import org.gradle.api.Task; public class VersioningPlugin implements Plugin { + private static final String TASK_GROUP = "Versioning"; + private static final String TASK_DESCRIPTION = "Prints the project's configured version"; + @Override public void apply(final Project project) { // Make settings available to build script. final Settings settings = project.getExtensions().create("versioning", Settings.class); - Task task = project.getTasks().create("printVersion"); - task.setGroup("Versioning"); - task.setDescription("Prints the project's configured version"); + Task task = project.getTasks().create("version"); + task.setGroup(TASK_GROUP); + task.setDescription(TASK_DESCRIPTION); task.doLast(t -> System.out.println(project.getVersion())); project.setVersion(new LazyVersion(project, settings));