Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Custom runIde task do not find the right runtime, if useInstaller is false #1827

Closed
bric3 opened this issue Nov 13, 2024 · 2 comments
Closed
Labels
Milestone

Comments

@bric3
Copy link
Contributor

bric3 commented Nov 13, 2024

What happened?

Suppose you have plugin that targets an older IJ version that runs on JBR 17, e.g. 2023.3.
But you want to have a run task that uses the latest IDE 2024.3 that runs with JDK 21.

When such a task is written the actual run JDK is JDK 17, also I don't think JCEF is included in this JBR.

I would have expected the correct JDK to be picked up, or at least have a way to configure the JDK / runtime for this runIde task.

Relevant log output or stack trace

Here's what is shown in the about window.

image

IntelliJ IDEA 2024.3 (Community Edition)
Build #IC-243.21565.193, built on November 13, 2024
Runtime version: 17.0.9+7-b1087.7 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 15.1
Kotlin analyzer version: 2.1.20-dev-1411
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
  ide.experimental.ui=true
  i18n.locale=
Kotlin: 243.21565.193-IJ

Steps to reproduce

Run ./gradlew runLatestIde with the following Gradle 8.11 reproducer project. THe plugin config has been stripped as it is irrelevant to this issue.

import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType

plugins {
    id("org.jetbrains.intellij.platform") version "2.1.0"
    kotlin("jvm") version "2.0.21"
}

repositories {
    mavenCentral()

    intellijPlatform {
        defaultRepositories()
        jetbrainsRuntime()
    }
}

dependencies {
    intellijPlatform {
        create(
            type = "IC",
            version = "2023.3",
            useInstaller = false // don't use the installer for the targeted platform
        )
        jetbrainsRuntime()

        instrumentationTools()
    }
}

intellijPlatformTesting {
    runIde {
        register("runLatestIde") {
//            localPath.set(file("/Users/brice.dutheil/Applications/IntelliJ IDEA Ultimate 2024.3 RC.app"))
            type = IntelliJPlatformType.IntellijIdeaCommunity
            version = "2024.3"
            // useInstaller = true // this has no effect
        }
    }
}

Gradle IntelliJ Plugin version

2.1.0

Gradle version

8.11

Operating System

macOS

Link to build, i.e. failing GitHub Action job

No response

@bric3 bric3 added the bug label Nov 13, 2024
@hsz hsz added this to the next milestone Nov 19, 2024
@hsz
Copy link
Member

hsz commented Nov 19, 2024

Thanks for reporting! It's now implemented and will be released with 2.2.0

@hsz hsz closed this as completed Nov 19, 2024
@bric3
Copy link
Contributor Author

bric3 commented Nov 19, 2024

Thank you !!!

hsz added a commit that referenced this issue Nov 19, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants