OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
11 stars 20 forks source link

Update Gradle IntelliJ Plugin version number #714

Closed anusreelakshmi934 closed 2 months ago

anusreelakshmi934 commented 3 months ago

Fixes #668

anusreelakshmi934 commented 2 months ago

Updated the Gradle IntelliJ Plugin version to 1.17.3 which is the latest in the build.gradle file. Was not able to run the extension after the change, so tried changing the distributionUrl to https\://services.gradle.org/distributions/gradle-7.6-all.zip and the extesnion ran. The PR builds are failing. But When running locally all the tests are getting success but encountering a NoSuchMethodException. Also we are getting > Task :initializeIntelliJPlugin SKIPPED in the log

anusreelakshmi934 commented 2 months ago

changed the distributionUrl to the latest gradle version distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip . Also Changed the compileTestKotlin in build.gradle to tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all. it ensures that the JVM target is set to 17 for all Kotlin compilation tasks, including both main and test sources. while compileTestKotlin only sets the JVM target to 17 for Kotlin code in the test sources. Now the test is successfull and not encountering NoSuchMethodException.

aparnamichael commented 2 months ago

Looks good to me.

anusreelakshmi934 commented 2 months ago

You mentioned this in one of your earlier comments:

Also we are getting > Task :initializeIntelliJPlugin SKIPPED in the log

What was the resolution for this? Has this gone away? Or can we ignore it, and if so, why?

When I checked the PR builds of this on GitHub, I noticed that the task :initializeIntelliJPlugin is not being skipped . Even in my local environment, I've observed instances where it isn't skipped always. I conducted some investigation but couldn't find any relevant information. However, I came across other links discussing some other issues, such as this one where Task :initializeIntelliJPlugin is mentioned as being skipped in the relevant log output or stack trace, and this one where it's noted in the build output that the task is skipped. In these discussions, nobody explicitly mentions Task :initializeIntelliJPlugin being skipped as an error or issue. Based on this information, I suppose this might be something we can overlook.

TrevCraw commented 2 months ago

Hi @anusreelakshmi934, I was reading a bit more about updating the Gradle wrapper version. This documentation is particularly useful: https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper.

I think we should follow the recommended way of updating the gradle wrapper - "run the wrapper task and provide the target Gradle version" (note, it looks like the wrapper task has to be run twice to completely update). Doing this will update all the other associated gradle wrapper files (gradle-wrapper.jar, gradlew, gradlew.bat).

anusreelakshmi934 commented 2 months ago

run the wrapper task

Hi @TrevCraw . I have updated gradle wrapper using gradle wrapper. Thereby updating the associated files (gradlew.bat, gradlew, gradle-wrapper.properties, gradle-wrapper.jar) automatically.