Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails when directory is not managed by git #24

Open
grv87 opened this issue Oct 21, 2017 · 1 comment
Open

Plugin fails when directory is not managed by git #24

grv87 opened this issue Oct 21, 2017 · 1 comment

Comments

@grv87
Copy link
Contributor

grv87 commented Oct 21, 2017

When directory is not managed by git then application of plugin just fails:

An exception occurred applying plugin request [id: 'de.gliderpilot.semantic-release', version: '1.2.0']
> Failed to apply plugin [class 'org.ajoberstar.gradle.git.base.GrgitPlugin']
   > One of setGitDir or setWorkTree must be called.

(The error message has been improved in modern versions, see ajoberstar/grgit#128.)

This situation occurs when someone downloads source code as archive and wants to build it.

I can't test new version 1.3.0 now, it's still not available for download from Gradle Plugins portal. But I don't see any code that would change that behavior.

Could you add a check: if directory is not managed by git then just skip all initialization part?

@tschulte
Copy link
Owner

Yes, Version 1.3.0 has not been uploaded to plugins.gradle.org. See pull request #26. But it is available using jcenter(). But that version will not make any difference for you.

I will increase the version of grgit. And then I will think about a sollution. The problem is, that because there are -- by design -- no version information anywhere in any file, when downloading the source code as archive, the build can not have any information about the version.

But in that case the default of gradle of using "undeclared" as version seems OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants