From e595cdc01e1b266443158cbb099546e0916cd8cb Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Thu, 28 Jun 2018 16:24:07 -0500 Subject: [PATCH] Fix regression with evaluating subprojects --- src/main/java/com/widen/versioning/VersioningPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/widen/versioning/VersioningPlugin.java b/src/main/java/com/widen/versioning/VersioningPlugin.java index 2129ec7..b5cfee9 100644 --- a/src/main/java/com/widen/versioning/VersioningPlugin.java +++ b/src/main/java/com/widen/versioning/VersioningPlugin.java @@ -17,7 +17,7 @@ public void apply(final Project project) { // Defer setting the version until after the build script is evaluated. project.afterEvaluate(p -> { - String version = VersionGenerator.generateFromGit(settings, p.getProjectDir()); + String version = VersionGenerator.generateFromGit(settings, p.getRootProject().getProjectDir()); if (version != null) { p.setVersion(version); }