From 7f2ddc62a198032e1d5a901bb6521b2a277bc39b Mon Sep 17 00:00:00 2001 From: Stephanie Miller Date: Mon, 30 Nov 2020 13:49:48 -0500 Subject: [PATCH] Relative directory support for git.root in java 1.14 #204 In newer versions of java than 1.8 Grgit.open is done relative to the daemon home instead of the project home. Using project.file on the git.root parameter if it exists fixes this. See example project: See https://github.com/shysteph/nebula-release-plugin-bug --- src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy b/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy index 79a62b3..5da752a 100644 --- a/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy +++ b/src/main/groovy/nebula/plugin/release/ReleasePlugin.groovy @@ -74,7 +74,7 @@ class ReleasePlugin implements Plugin { void apply(Project project) { this.project = project - def gitRoot = project.hasProperty('git.root') ? project.property('git.root') : project.rootProject.projectDir + def gitRoot = project.hasProperty('git.root') ? project.file(project.property('git.root')) : project.rootProject.projectDir try { git = Grgit.open(dir: gitRoot)