Plugin dependency messing with my plugin dependencies

Answered

Hi, everyone. Here is a problem. I develop a language plugin. I have a dependency to kotlin serialization library. It works fine, but if I add a platform plugin dependency like the one below. It interferers with my "kotlinx-serialization-json:1.3.0" and it loads a different version of this library. Can I fix it? I though plugins could use different versions of the same library. Is it true or not?

plugins {
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.5.30"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.1.6"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.0"
// Gradle Qodana Plugin
id("org.jetbrains.qodana") version "0.1.12"

kotlin("plugin.serialization") version "1.5.30"

id("org.jetbrains.kotlinx.benchmark") version "0.3.1"
id("org.jetbrains.kotlin.plugin.allopen") version "1.5.30"
}

// Configure project's dependencies
repositories {
mavenCentral()
jcenter()
}

// in build.gradle.kts
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
}

// ...

intellij {
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}

 

# in grade.properties
platformPlugins = com.jetbrains.hackathon.indices.viewer:1.12
2 comments
Comment actions Permalink

It compiles and runs, so grade works. Unfortunately the IDE still looks in a wrong place. Anyway, thanks for the link.

0

Please sign in to leave a comment.