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); }