Plugin not using License of IntelliJ ultimate and prompts for Activation

Answered

I have an intelliJ ultimate version and trying to develop a plugin. I have set the type to IU and localPath to point to the IntelliJ ultimate location.

On running runIde task, it starts an intelliJ ultimate instance but does not use/recognise the license and prompts for Activation. I even tried to set IdeDir of runIde task to intellij ultimate location but still it doesnt work

How to i debug the plugin by starting the IntelliJ ultimate with licence. 

Any help on this please ?

 

1
5 comments

I tried removing the IDE sandbox folder under build, but it does not have any effect and got created when i executed runIde task.

It starts the intelliJ ultimate instance but does not recognize the license and prompts for Activation everytime. how do I make the runIde task to use intelliJ ultimate with proper license loaded ?

Pls note, when i start the intelliJ ultimate seperately (not from plugin), it starts with license correctly.

Issue is when trying to use/test plugin via runIde task.

Please help on this as I am currently blocked for past few weeks

Thanks

 

0

I could not reproduce this, after activation of license in sandbox IDE instance it would recognize it again on next start as expected.

Could you please link your Gradle build file?

0

Thanks for the quick response Yann.

Please find my gradle build file added below

Location of my intellij ultimate - C:\\softwares\\idea2023.1\\2023.1.5

It is licensed and i could see the .key file in the above folder.

plugins {
  id("java")
  id("org.jetbrains.kotlin.jvm") version "1.8.21"
  id("org.jetbrains.intellij") version "1.13.3"
}

group = "com.example"
version = "1.0-SNAPSHOT"

repositories {
  mavenCentral()
}

// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
  type.set("IU") // Target IDE Platform
  localPath.set("C:\\softwares\\idea2023.1\\2023.1.5")

  plugins.set(listOf(/* Plugin Dependencies */))
}

tasks {
  // Set the JVM compatibility versions
  withType<JavaCompile> {
    sourceCompatibility = "17"
    targetCompatibility = "17"
  }
  withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions.jvmTarget = "17"
  }

  runIde {
    ideDir.set(file("C:\\softwares\\idea2023.1\\2023.1.5"))
  }
}
1

1. id("org.jetbrains.intellij") version "1.13.3" is outdated version, please always update to the latest one https://github.com/JetBrains/gradle-intellij-plugin/releases

2. in intellij block, you can't set “type” and “localPath” simultaneously, please refer to the docs https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type

Try setting type only with additional version.set("2023.1.5") instead and remove the explicit ideDir configuration in runIde task, then activate sandbox instance.

 

0

Please sign in to leave a comment.