CIDR in new versions of IC

Answered

Hello,

I am developing plugin for Android Studio. For my usecase I really need cidr packages. For example

com.jetbrains.cidr.lang.inspections.OCInspections

So far I've been developing for AS version 4.2.2 (IC 202.7660.26). Today I tried to upgrade it to 203.7717.56, but after gradle sync it throws a bunch of

Unresolved reference: cidr

It does not seem to find the package at all. Why is that?

Thanks,
Tomas Horovsky

5 comments
Comment actions Permalink

Tom Horovsky, how does your build file look like?

0
Comment actions Permalink

build.gradle.kts:

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

fun properties(key: String) = project.findProperty(key).toString()

//val studioPath: String? = System.getenv("STUDIO_PATH")
val studioPath: String? = "/home/me/android-studio/"

if (studioPath == null)
throw GradleException("STUDIO_PATH environment variable is not set in IDEA run configuration! Suggestion: (STUDIO_PATH=/home/.../android-studio)")

buildscript {
repositories {
mavenCentral()
maven(url = "https://www.jetbrains.com/intellij-repository/releases")
}
}


plugins {
id("java")
id("org.jetbrains.intellij") version "1.3.0"
id("org.jetbrains.changelog") version "1.3.1"
id("org.jetbrains.kotlin.jvm") version "1.6.0"
}

group = "my.group"
version = properties("pluginVersion")

repositories {
mavenCentral()
}

dependencies {
implementation(kotlin("stdlib"))
}

intellij {
pluginName.set(properties("pluginName"))
type.set(properties("platformType"))
downloadSources.set(properties("platformDownloadSources").toBoolean())
updateSinceUntilBuild.set(true)
plugins.set(properties("platformPlugins").split(",").map(String::trim).filter(String::isNotEmpty))
localPath.set(studioPath)
version.set(properties("platformVersion"))
}

tasks {
patchPluginXml {
// Get the latest available change notes from the changelog file
changeNotes.set(provider {
changelog.run {
getOrNull(properties("pluginVersion")) ?: getLatest()
}.toHTML()
})
}

runIde {
ideDir.set(file(studioPath!!))
maxHeapSize = "2g"
}

// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
}
}

wrapper {
gradleVersion = properties("gradleVersion")
}

instrumentCode {
compilerVersion.set(properties("platformVersion"))
}
}

gradle.properties

kotlin.code.style=official

pluginVersion = 1.0

pluginName = MyPlugin
platformType = IC
platformDownloadSources = true
platformVersion = 203.7717.56
platformPlugins = android

gradleVersion = 7.3
javaVersion = 11

I know that I don't have cidr in the platformPlugins, but it did not work even on 202.7660.26 when I had it there. Adding it with this version does not fix my issue.

0
Comment actions Permalink

Tom Horovsky,

Could you please try the following configuration:

platformPlugins = android,cidr-base-plugin,c-plugin

 

0
Comment actions Permalink

Yes that works!

Thank you very much, I did not know the correct plugin-names so I was trying out cidr or jetbrains-cidr. Obviously these were incorrect.

 

0
Comment actions Permalink

No problem.

These are not really plugin names. They are names of directories in `<DIST>/plugins` directory. If you know which jar contains missing class - you can include platformPlugin named after the directory containing that jar.

0

Please sign in to leave a comment.