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

ASF subversion and git services commented on KUDU-3551:
-------------------------------------------------------

Commit e456bc775805d4555d99ce12d04e3ca0b8950760 in kudu's branch 
refs/heads/master from Zoltan Chovan
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=e456bc775 ]

[build] KUDU-3551 Upgrade gradle to 7.6.4

The current version of gradle is 3+ years old, and the highest Java
version supported by it is Java 13, which is ~5years old. Upgrading
Kudu's gradle version will make it possible to move from Java8 to a more
recently released stable Java version, that would futureproof the Kudu
Java client. Gradle 7.6 makes it possible to use up to Java19.
Additionally Gradle has fixed multiple security vulnerabilities and
issues since 6.8.3 [1]

*   Gradle version has been upgraded to 7.6.4 from 6.8.3, both in the
    dependencies declaration and the actual wrapper code itself
    (/java/gradlew)
*   Removed jcenter from list of repositories [2]
*   Replaced compile and testCompile configurations with implementation
    and testImplementation respectively [3]
*   Replaced extension methods with archiveExtension [4]
*   Removed scopes.gradle and the propdeps plugin as optional and
    provided scopes are no longer supported/working in Gradle7, these
    have been replaced by either compileOnly
*   Upgraded scalafmt version [5]
*   Pinned the scalafmt config to version 1.5.1 to avoid the new
    formatting errors that popped up with the new scalafmt version
*   Upgraded Spark3 version to 3.2.4 to solve Guava related compilation
    errors (some classes have been deprecated and removed, which led to
    compilation failure)
*   Updated the shadow plugin version from 6.1.0 to 7.1.2
*   Added LogCaptor to resolve issues with CapturingLogAppender, which
    stopped working in the Scala tests, fixing was taking too much time
    so this was implemented as a workaround, it only affected 4 tests
    in TestKuduBackup.scala, if the CLA errors are fixed later, the
    dependency can be removed and the test changes reverted.
*   As the legacy maven plugin was removed, the signing and publishing
    has been rewritten using the new maven-publish plugin. I tested the
    signing and publishing with a locally hosted Maven repository,
    however this needs further testing and confirmation from a commiter
    to ensure it works as expected. The new plugin uses a different
    task to publish the artifacts (publish instead of uploadArchives)
    an alias was created to keep backwards compatibility with existing
    docs/scripts.
*   The permissions for assign-location.py script were updated, as
    previously the permissions of it's symlink were copied, but that
    changed in the new gradle version and the original (non executable)
    permissions led to test failures.
*   Two tasks were updated in the shadow.gradle file as well, this
    needs another round of verification after the jars are built
    correctly
*   Dependency scopes were only modified when necessary (compilation
    failure)

Additional manual testing:
* Attila Bukor has tested and confirmed that the java artifact signing
  and publishing works.

[1] 
https://docs.gradle.org/7.6.3/release-notes.html?_gl=1*n7ayww*_ga*MjQ4NTk5ODI5LjE2ODc0MDc0OTA.*_ga_7W7NC6YNPT*MTcxNzc2MzIzOS44NC4xLjE3MTc3NjQyMTUuMjYuMC4w
[2] 
https://docs.gradle.org/6.9.2/userguide/upgrading_version_6.html?_gl=1*1xt1kk*_ga*MjQ4NTk5ODI5LjE2ODc0MDc0OTA.*_ga_7W7NC6YNPT*MTcwNzEyMzc1Ni4zLjEuMTcwNzEyODU2MS41NC4wLjA.#jcenter_deprecation
[3] 
https://docs.gradle.org/6.9.2/userguide/upgrading_version_5.html?_gl=1*1ldn5ls*_ga*MjQ4NTk5ODI5LjE2ODc0MDc0OTA.*_ga_7W7NC6YNPT*MTcwNzEyMzc1Ni4zLjEuMTcwNzEyODY1My40NS4wLjA.#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
[4] 
https://docs.gradle.org/6.9.2/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.html?_gl=1*1ldn5ls*_ga*MjQ4NTk5ODI5LjE2ODc0MDc0OTA.*_ga_7W7NC6YNPT*MTcwNzEyMzc1Ni4zLjEuMTcwNzEyODY1My40NS4wLjA.#org.gradle.api.tasks.bundling.AbstractArchiveTask:extension
[5] https://github.com/alenkacz/gradle-scalafmt/issues/39

Change-Id: I915dab011aba633d55a79c72ea6f459d703d7f47
Reviewed-on: http://gerrit.cloudera.org:8080/21030
Tested-by: Kudu Jenkins
Reviewed-by: Attila Bukor <abu...@apache.org>


> Upgrade Gradle
> --------------
>
>                 Key: KUDU-3551
>                 URL: https://issues.apache.org/jira/browse/KUDU-3551
>             Project: Kudu
>          Issue Type: Improvement
>            Reporter: Zoltan Chovan
>            Assignee: Zoltan Chovan
>            Priority: Major
>              Labels: build, java
>
> Since the Gradle version in Kudu is 6.8.2 (the project defines 6.9.2, but the 
> wrapper is still at 6.8.2), which is roughly 3 years old, it's probably time 
> to upgrade.
> The maven plugin is deprecated, so the publishing/signing of artifacts needs 
> to be reworked with maven-publish plugin.
> Upgrading also would enable Kudu to be built with newer java versions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to