-
Notifications
You must be signed in to change notification settings - Fork 6
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 makes build fail in non git project #5
Comments
Good point and thank you for PR #6 I'd like to explore option 1 in order to avoid having to manually set the If we go with option 2, it's a good opportunity to use plugin properties so that we can configure something like:
|
aVolpe
added a commit
to aVolpe/jpos-gradle-plugin
that referenced
this issue
Sep 28, 2023
The plugin can now be configured using a 'jpos' directive in the .gradle file: ```groovyjpos { target = "devel" addGitRevision = true addBuildTime = true archiveJarName = "${project_name}-${version}.jar" archiveWarName = "${project_name}-${version}.war" installDir = build/install/${project_name} distDir = src/dist } ``` A non trivial refactor of the plugin was made to ensure that those properties can be configured and used as described in the README. This commit also makes this plugin compatible with gradle 8, so it fixes jpos#3 The configurability of git revision data also fixes jpos#5. And it can be a workaround for jpos#7 using a different distDir. Signed-off-by: Arturo Volpe <[email protected]>
aVolpe
added a commit
to aVolpe/jpos-gradle-plugin
that referenced
this issue
Sep 28, 2023
The plugin can now be configured using a 'jpos' directive in the .gradle file: ```groovy jpos { target = "devel" addGitRevision = true addBuildTime = true archiveJarName = "${project_name}-${version}.jar" archiveWarName = "${project_name}-${version}.war" installDir = build/install/${project_name} distDir = src/dist } ``` A non trivial refactor of the plugin was made to ensure that those properties can be configured and used as described in the README. This commit also makes this plugin compatible with gradle 8, so it fixes jpos#3 The configurability of git revision data also fixes jpos#5. And it can be a workaround for jpos#7 using a different distDir. Signed-off-by: Arturo Volpe <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The plugin makes the
jar
task to depend oncreateGitRevision
task, that fails if this is not a git repository, the build even fails after performing agit init
with aNoHeadException
.There are many options for this:
The easier to implement are 2 and 3.
I don't know if there is an easy way of asking
jGit
about whether the project is in a git repository or not, without using hard coded literals for implementing 1. But also for this we would need to ask git specific questions from theJPOSPlugin
class, of course we can relay that to aGitRevisonTask
method.The text was updated successfully, but these errors were encountered: