-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add logging & improve version detection for plugin{} block usage #371
Conversation
As part of the profile publishing we discovered that it's possible to leave a version unspecified before the plugin is applied. this change fixes that & adds logging for debugging |
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.
I think it is the version
property that is actually used by maven-publish
so if only projectVersion
is set, we need to also set the version
property.
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
src/main/groovy/org/grails/gradle/plugin/publishing/GrailsPublishGradlePlugin.groovy
Outdated
Show resolved
Hide resolved
@jdaugherty I think this is still an issue. What happens if only |
The purpose of this plugin is it needs to determine if it's a release or a snapshot so it can handle the nexus publishing vs snapshot logic. It currently does that based on the project.version property. The issue is if you apply this plugin in the rootProject under the plugins {} block, it will be evaluated before project.version can be set. Worse, we can't do this check in the afterEvaluate because at that point it's too late to apply the nexus plugin. I added the projectVersion check as a work around since we typically use that variable. I think the real solution is to move the release state to a variable and then we wouldn't need the version. Basically, we could do those checks outside of gradle. I was hesitant to make this change for this release since it means every action has to change again. Although, I think realistically we always know based on the action if it's a release or snapshot so I really like this idea instead of relying on the version #. |
No description provided.