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

Update grgit-core dependency version to 4.0.1 from 3.3.1 #141

Closed
wants to merge 1 commit into from
Closed

Update grgit-core dependency version to 4.0.1 from 3.3.1 #141

wants to merge 1 commit into from

Conversation

jhg023
Copy link

@jhg023 jhg023 commented Jan 7, 2020

I use gradle-git-properties in a project of mine, and I ran into an issue that can only be solved by updating the grgit-core dependency version to 6.0.1.

The issue is that version 3.1.1 of grgit-core currently depends on an outdated version of org.eclipse.jgit, which is breaking my project's build with the following message:

Execution failed for task ':generateGitProperties'.
> No signature of method: org.eclipse.jgit.api.DescribeCommand.setTags() is applicable for argument types: (Boolean) values: [false]
  Possible solutions: setLong(boolean), setTarget(java.lang.String), setTarget(org.eclipse.jgit.lib.ObjectId), getClass(), 
  equals(java.lang.Object)

I believe that this upgrade will fix my issue, as well as possibly #140

Thanks!

I use `gradle-git-properties` in a project of mine, and I ran into an issue that can only be solved by updating the `grgit-core` dependency version to `6.0.1`.

The issue is that version `3.1.1` of `grgit-core` currently depends on an outdated version of `org.eclipse.jgit`, which is breaking my project with the following message:

    Execution failed for task ':generateGitProperties'.
       > No signature of method: org.eclipse.jgit.api.DescribeCommand.setTags() is applicable for argument types: (Boolean) values: [false]
       Possible solutions: setLong(boolean), setTarget(java.lang.String), setTarget(org.eclipse.jgit.lib.ObjectId), getClass(), 
           equals(java.lang.Object)
 
I believe that this upgrade will fix my issue, as well as possibly #140
@tha2015
Copy link
Collaborator

tha2015 commented Jan 8, 2020

Thanks @jhg023 for the contribution. I will need some time to reproduce the issue to understand why the issue is happening on Gradle 6.0.1 and try the fix. If you have a simple example project which has the issue, you are more than welcome to attach it to the related issue (issue #140 ?).

@jhg023
Copy link
Author

jhg023 commented Jan 8, 2020

@tha2015 I appreciate the quick response! I'll try putting a minimal example together to emulate what I'm experiencing.

@jhg023
Copy link
Author

jhg023 commented Jan 8, 2020

I can't seem to reproduce it on my Windows machine. However, I'm going to build a local version of gradle-git-properties with my change to verify that it fixes my issue. Currently, my only solution is to remove gradle-git-properties from my project entirely, which I obviously don't want to do!

@tha2015
Copy link
Collaborator

tha2015 commented Jan 8, 2020

Can you try gradle-git-properties 1.5.2 to see if it fixes the issue? I suspect that there is another plugin which also using a different of jgit (see #133 (comment) )

@jhg023
Copy link
Author

jhg023 commented Jan 8, 2020

Version 1.5.2 resolves the issue. The only other plugin that I'm using that depends on a different version of jgit is spotless (https://github.com/diffplug/spotless), but their version is up to date. Would downgrading be the recommended solution here, or should I still try building a local version of gradle-git-properties with an updated grgit-core dependency to verify that my proposed change works?

@tha2015
Copy link
Collaborator

tha2015 commented Jan 8, 2020

I looked into spotless plugin and they seem to use jgit version 5.5 which is new.
But I'm not sure which spotless version you use in your build.gradle so I can't say for sure.

If we can find out the combination of spotless+gradle-git-properties which having the issue, it will be helpful.

For the mean time, I would suggest you to use v1.5.2 until we know more about the issue and release a fix. I might take several days until we know more.

Thanks,
Thai

@jhg023
Copy link
Author

jhg023 commented Jan 8, 2020

I'm using the latest version of Spotless in my project, which depends on version 5.5 of jgit, as you stated. gradle-git-properties transitively depends on version 5.3 of jgit, which I assume is the cause of my issue.

If building my own version of gradle-git-properties with the updated grgit-core solves the issue, I'll let you know. Otherwise, I'll just downgrade to 1.5.2. Thanks again!

@jhg023
Copy link
Author

jhg023 commented Jan 8, 2020

I just noticed that my project also depended on a Gradle semantic versioning plugin, which depended on an older version of jgit (4.8.0), ultimately causing the issue. Everything is fine after removing the semantic versioning plugin, even when using Gradle 6.0.1 with version 2.2.0 of gradle-git-properties.

I'm sorry for thinking this was caused by this plugin!

@jhg023 jhg023 closed this Jan 8, 2020
@jhg023 jhg023 deleted the patch-1 branch January 8, 2020 15:19
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

Successfully merging this pull request may close these issues.

2 participants