[ 
https://issues.apache.org/jira/browse/CALCITE-5197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558380#comment-17558380
 ] 

Sergey Nuyanzin commented on CALCITE-5197:
------------------------------------------

{quote}
1. When we upgrade Gradle, we need to change the version in the howto. (See 
CALCITE-4575 for why this is necessary.) Please make that change. 
{quote}
done

{quote}2. It is my understanding that the Gradle wrapper needs to be updated 
much less frequently than Gradle. This change seems to encourage people to 
update the wrapper more frequently. Is that what we want? In my opinion, we 
should only upgrade the wrapper when necessary.
{quote}
Gradle's recommended way of upgrading is using of {{wrapper}} task like 
{noformat}./gradlew wrapper --gradle-version <new_version>{noformat} As 
mentioned at [Upgrading the Gradle 
Wrapper|https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper]
 in case of necessity it will upgrade both wrapper and Gradle.
{quote}
3. I think that howto should include sections "How to upgrade Gradle" and "How 
to upgrade the Gradle wrapper". If you agree, can you add them.
{quote}
I added "Upgrade Gradle and Gradle wrapper" since both could be updated in the 
same way

> Bump gradle to 7.4.2 and add checksum autoupdate
> ------------------------------------------------
>
>                 Key: CALCITE-5197
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5197
>             Project: Calcite
>          Issue Type: Improvement
>          Components: build
>    Affects Versions: 1.30.0
>            Reporter: Sergey Nuyanzin
>            Assignee: Sergey Nuyanzin
>            Priority: Trivial
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The problem with gradle update via
> {code}
> ./gradlew wrapper --gradle-version <new_version> && ./gradlew autostyleApply
> {code}
> it removes checksum from {{gradle/wrapper/gradle-wrapper.properties}}
> there could be added a task which could update checksum as well, e.g.
> {code}
> tasks.wrapper {
>     distributionType = Wrapper.DistributionType.BIN
>     doLast {
>         val sha256Uri = URI("$distributionUrl.sha256")
>         val sha256Sum = String(sha256Uri.toURL().readBytes())
>         propertiesFile.appendText("distributionSha256Sum=${sha256Sum}\n")
>     }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to