ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
187 stars 28 forks source link

Getting "No VCS found/configured" when switching from gradle-gitflow:0.2.0 #79

Closed moaxcp closed 6 years ago

moaxcp commented 6 years ago

I'm trying to switch from the gradle-gitflow plugin. I added this plugin and added the configuration.

plugins {
    id "org.ajoberstar.reckon" version "0.6.0"
}
...
reckon {
    normal = scopeFromProp()
    preRelease = stageFromProp('beta', 'rc', 'final')
}

I'm getting this output

0 + john@n1 graph-dsl $ ./gradlew clean
No VCS found/configured. Version will be 'unspecified'.
:clean UP-TO-DATE

BUILD SUCCESSFUL in 0s
1 actionable task: 1 up-to-date

I am definately running this from a git repo

0 + john@n1 graph-dsl $ git status
On branch feature/refactor-methods
Your branch is up to date with 'origin/feature/refactor-methods'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   README.md
    modified:   build.gradle

no changes added to commit (use "git add" and/or "git commit -a")

Any ideas on what I should do?

ajoberstar commented 6 years ago

You'll need to add the grgit plugin to your plugins block also.

Original intent was to support more than Git so I didn't want a transitive dependency on grgit. At the moment that's the only practical way to use grgit.

moaxcp commented 6 years ago

Ah nice. Thanks for the help!

ajoberstar commented 6 years ago

FYI, 0.7.0 will be applying grgit by default. I think it's unlikely I'll support other VCSs, so it would be simpler for users to just have it applied directly.