intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

1.11.0 + 2022.3: Seems like JBR path is incorrect

Open vicky17d opened this issue 2 years ago • 2 comments

Describe the bug I just started upgrading to 2022.3 and gradle-intellij-plugin 1.11.0 After upgrading the wrapper around gradle-intellij-plugin and then using it in my plugin build, I am running into some Jbr issues for ex.

> Task :myplugin:compileJava FAILED
Invalid Java installation found at '/Users/vickyd/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbr_jcef-17.0.5-osx-x64-b653.23/jbrsdk-17.0.5-osx-x64-b653.23/jbrsdk-17.0.5-x64-b653/Contents/Home' (specific installation). It will be re-checked in the next build. This might have performance impact if it keeps failing. Run the 'javaToolchains' task for more details.
[5:28](https://jetbrains-platform.slack.com/archives/D0120580HS7/p1673314134692099)

If you notice, the last part of the path is missing osx and the minor version .23 i.e. jbrsdk-17.0.5-x64-b653 instead of jbrsdk-17.0.5-osx-x64-b653.23

any ideas or any recent changes I should be aware of?

To Reproduce Not sure as this is coming up in the wrapper plugin around gradle-intellij-plugin May be looking into if new JBRs are good

Expected behavior No error Environment:

  • OS: macOS 13.1 on Apple M1 Pro
  • Gradle IntelliJ Plugin Version: 1.11.0
  • Gradle Version: 7.6

vicky17d avatar Jan 18 '23 00:01 vicky17d

Hi @vicky17d, I encountered this issue as well when upgrading to 2022.3. Sometime around 17.0.5 the name of the root directory was changed to match the name of the package (i.e. includes platform name and the full build version). In my wrapper code I define a method:

private boolean useJdkName() {
    return (this.javaMajorVersion > JAVA_17)
            || (this.javaMajorVersion == JAVA_17 && this.buildVersionNumber.compareTo(new Version("653.14")) >= 0);
}

Your code may vary but you get the intent.

baron1405 avatar Feb 12 '23 23:02 baron1405

Can't reproduce on 1.13.1-SNAPSHOT — could you please verify if this problem is still valid?

hsz avatar Mar 01 '23 10:03 hsz