palantir-java-format icon indicating copy to clipboard operation
palantir-java-format copied to clipboard

Upgrade to Gradle 8

Open mandrean opened this issue 1 year ago • 1 comments

  • Bump Intellij plugins (I get a compilation error otherwise)
  • Bump gradle wrapper to v8.5

Seems to work for me?

❯ cd ~/src/github.com/palantir/palantir-java-format

❯ java -version
openjdk version "21" 2023-09-19 LTS
OpenJDK Runtime Environment Temurin-21+35 (build 21+35-LTS)
OpenJDK 64-Bit Server VM Temurin-21+35 (build 21+35-LTS, mixed mode)

❯ gradle -version
------------------------------------------------------------
Gradle 8.5
------------------------------------------------------------

Build time:   2023-11-29 14:08:57 UTC
Revision:     28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin:       1.9.20
Groovy:       3.0.17
Ant:          Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM:          21 (Eclipse Adoptium 21+35-LTS)
OS:           Mac OS X 14.3 aarch64

❯ gradle spotlessApply

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 532ms
15 actionable tasks: 15 up-to-date

mandrean avatar Feb 15 '24 15:02 mandrean

Thanks for your interest in palantir/palantir-java-format, @mandrean! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

palantirtech avatar Feb 15 '24 15:02 palantirtech

@mandrean A gradle wrapper update also involves updating gradlew, gradlew.sh, and the .jar file. These updates are not included in your PR. - Simply calling the spotlessApply task is not enough. You need to build and test the plugin using ./gradlew check.

My output is:

$ gradle check
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\git-repositories\palantir-java-format\idea-plugin\build.gradle' line: 18

* What went wrong:
A problem occurred evaluating project ':idea-plugin'.
> Failed to apply plugin 'org.jetbrains.intellij'.
   > Could not create task ':idea-plugin:buildPlugin'.
      > 'void org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact.<init>(org.gradle.api.tasks.bundling.AbstractArchiveTask)'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 17s

Note that I used my installed gradle version 8.5.

koppor avatar Mar 06 '24 20:03 koppor

@mandrean Please create a pull request on your own repository (https://github.com/mandrean/palantir-java-format/pulls). Then, you GitHub actions of this repository will run. I am curious what the Gradle Wrapper Validation Action will say...

Update OMG, the validator validates the .jar only -- https://github.com/gradle/actions/issues/283

koppor avatar Mar 06 '24 20:03 koppor

Related: Automatic update of gradle wrapper: https://github.com/palantir/palantir-java-format/pull/995

koppor avatar Mar 06 '24 20:03 koppor

Automation upgraded to Gradle 8: https://github.com/palantir/palantir-java-format/pull/1028

CRogers avatar May 02 '24 15:05 CRogers