From df628fcc3e15998b83b4468427e7fad9239ba2b7 Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Mon, 13 Jul 2015 14:16:56 -0400 Subject: [PATCH] Updated name to moduleName and implemented method to return the expected module name instead of flavor + status that variant names now return. --- .../betterernaming/RenameConfigExtension.groovy | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/com/ToxicBakery/betterernaming/RenameConfigExtension.groovy b/src/main/groovy/com/ToxicBakery/betterernaming/RenameConfigExtension.groovy index ebeabb4..90e09aa 100644 --- a/src/main/groovy/com/ToxicBakery/betterernaming/RenameConfigExtension.groovy +++ b/src/main/groovy/com/ToxicBakery/betterernaming/RenameConfigExtension.groovy @@ -21,9 +21,20 @@ import java.text.SimpleDateFormat @SuppressWarnings(["GroovyUnusedDeclaration", "GrMethodMayBeStatic"]) class RenameConfigExtension { - String artifactFormat = '%name%-%versionName%-%gitBranch%-%gitSha1Short%-%timeStamp%.%ext%'; + String artifactFormat = '%moduleName%-%versionName%-%gitBranch%-%gitSha1Short%-%timeStamp%.%ext%'; String outputExtension + /** + * Project variant names are now formatted as . This method returns the + * module (project) name as %name% now typically returns the status which is not expected on + * single variant applications. + * + * @return the project/module name + */ + String moduleName() { + return project.name + } + String gitSha1() { return executeCommand("git rev-parse HEAD") }