Closed roguexz closed 6 years ago
There are a few things going on here:
I was trying to figure out what the initial version of the project should be set to. I created a tag called 0.0.0 and added the plugin without any version details.
There's no need to have any initial tags. Reckon will fall back to 0.0.0 as a base and increment from there. Adding a 0.0.0 should not cause any issues though.
No signature of method: org.ajoberstar.reckon.gradle.ReckonPlugin$DelayedVersion.trim() is applicable for argument types: () values: []
This error implies to me that something in your build is assuming project.version
is a String
, when Gradle technically treats it as an Object
. Someone who wants a String
version should be (either explicitly or implicitly) calling toString()
on it. Reckon relies on this in order to delay version inference as late as possible.
Is the example build file you provided complete? I would expect that a reckon {}
block without a preRelease
specified should cause an error. I'm also not seeing anything that calls trim()
, but there must be something in your build or a plugin you use that does so. Reckon does not call trim()
anywhere in the Gradle plugin.
Interesting. The snippet is not complete, I can try removing the other plugins to see what is causing the issue. Thank you again for your help. Let me test it out and confirm.
Ack. The issue was with another plugin. After removing it, I can see that it is defaulting to 0.0.0
. Next question that I have is, why is the minor version not incrementing when using the exact same command as there in the docs.
gradle print -Preckon.scope=minor -Preckon.stage=milestone
The tag is present in the local repository and has not been pushed to the remote (I am still testing the plugin out). Does the plugin look at tags present on the remote? Or on the ones checked out locally?
Never mind .. Had to debug through the code to figure out what was happening. I had made local changes (not yet committed) and was hoping to see the version number change. I am making use of the snapshot strategy and thought I would be seeing the version number increment, because I had uncommitted files. Do you have any suggestions on how something like that can be worked with your plugin?
I haven't implemented support for detecting uncommitted files, but I'll open an issue for that. That was a feature of gradle-git, so it would be good to have here too.
Thank you so much. Should we close this issue then?
BTW, I see that grgit
is available on MVN Central, but not reckon
. Is that intentional? I am trying to bake reckon
in to a plugin of mine (which enforces certain rules pertaining to my org) which is when I noticed that I got only half the files 😄 ... I will configure the BT repo, but just wanted to let you know.
Yeah, we can close this now if we've covered all of your questions.
I've only published to JCenter for the last couple years (you may notice that grgit on Maven Central is from 2016). Maven Central has more picky publishing rules, and I didn't want to deal with them when I broke the gradle-git plugin up. Not ruling out adding them in the future, but for now JCenter is the place to look.
I was trying to figure out what the initial version of the project should be set to. I created a tag called
0.0.0
and added the plugin without any version details. But that failed with the following error.Here is how I am using the plugin,
Can you please tell me how I should use the plugin? I am a little lost and not sure where the version should be defined.
Environment