[
https://issues.apache.org/jira/browse/SOLR-15361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17327174#comment-17327174
]
Dawid Weiss commented on SOLR-15361:
------------------------------------
Gradle is code. The evaluation/ execution order matters - in your snippet the
'hasPlugin' may return false even if the plugin is eventually applied to that
project. There are "lazy" collections which invoke the provided closure when a
given condition triggers, see this snippet:
{code}
plugins.withType(DistributionPlugin) {
plugins.withType(SigningPlugin) {
println "# TADAM, configuring: ${project.path}"
}
}
{code}
Note the brackets are not for grouping expressions - they're actually closures
passed as an argument to withType method:
https://docs.gradle.org/current/javadoc/org/gradle/api/DomainObjectCollection.html#withType-java.lang.Class-groovy.lang.Closure-
Once you understand what the above code does, the rest is kind of easier to
digest. I left a patch that works configuring signing lazily (note tasks are
referenced by their string names, not as properties - this is also entailed by
lazy evaluation).
I don't think this patch should be applied - yours is simpler - but
understanding what's going on in it is certainly worth the time.
> update gradle build to support gpg signing of tgz/zip distributions
> -------------------------------------------------------------------
>
> Key: SOLR-15361
> URL: https://issues.apache.org/jira/browse/SOLR-15361
> Project: Solr
> Issue Type: Task
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Chris M. Hostetter
> Assignee: Chris M. Hostetter
> Priority: Major
> Fix For: main (9.0)
>
> Attachments: SOLR-15361.patch, SOLR-15361.patch
>
>
> the gradle build does not currently have any support for gpg signing the
> distributions we produce.
> this is neccessary for releases, and for being able to "smoke test" our
> Dockerfiles prior to release (by creating mock download servers to confirm
> {{docker build}} can correctly fetch the {{tgz}} & {{tgz.asc}} files we point
> it at)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]