You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Task :compileLang NO-SOURCE
> Task :processResources
> Task :classes
You haven't configured the version of your plugin. Please add version = ‹a version number› to your build.gradle file.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':jar'.
> The JOSM plugin josm-fieldpapers misses required configuration options. See above for which options are missing.
> Task :jar FAILED
The reason will be displayed to describe this comment to others. Learn more.
@iandees You should set version = "something" at the root of your build.gradle file, not in the JOSM block. Put the version of your plugin (the fieldpapers plugin) in there, not the version of the gradle-josm-plugin.
This line needs to be set to the version of the gradle-josm-plugin (currently 0.8.2):
The reason will be displayed to describe this comment to others. Learn more.
That is probably related to the default behavior of github.com/actions/checkout. In order for the autotagging to work, the tags must be available.
So adding
with:
fetch-depth: 0
to the actions/checkout@v4 github checkout action should also work. If you don't want to get all history (not a problem with this repo, I don't think), then @floscher's method is better. But you have to remember to update the version.
The issue with tags not being available in Github Actions probably comes on top, wasn't aware of that. There seems to be an option specifically for that as well:
fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to do this. The gradle plugin should be reading the latest tag.
fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a build error when I first ran Gradle in Github CI: https://github.com/fieldpapers/josm-fieldpapers/actions/runs/10774405220/job/29876379547
It said:
fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iandees You should set
version = "something"
at the root of your build.gradle file, not in the JOSM block. Put the version of your plugin (the fieldpapers plugin) in there, not the version of the gradle-josm-plugin.This line needs to be set to the version of the gradle-josm-plugin (currently 0.8.2):
josm-fieldpapers/build.gradle
Line 3 in fcf5684
fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Will update!
fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is probably related to the default behavior of github.com/actions/checkout. In order for the autotagging to work, the tags must be available.
So adding
to the
actions/checkout@v4
github checkout action should also work. If you don't want to get all history (not a problem with this repo, I don't think), then @floscher's method is better. But you have to remember to update the version.fcf5684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iandees @tsmock Ah yes, normally the plugin would read the version from the tag, when available. That would indeed be easier.
The issue could also be that you are using a non-annotated tag. Only annotated tags are considered for the version number. See here for how to do that: https://git-scm.com/book/en/v2/Git-Basics-Tagging#_creating_tags
The issue with tags not being available in Github Actions probably comes on top, wasn't aware of that. There seems to be an option specifically for that as well:
(https://github.com/actions/checkout)
Then you don't need to add version = "something" to the build.gradle