Skip to content

[PE] fix missing ai, yaml plugin dependencies #8201

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ jvmVersion = when (javaVersion) {
"17" -> {
JvmTarget.JVM_17
}

"21" -> {
JvmTarget.JVM_21
}

else -> {
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
}
Expand Down Expand Up @@ -115,13 +117,16 @@ dependencies {
// Plugin dependency documentation:
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#plugins
val bundledPluginList = mutableListOf(
"com.google.tools.ij.aiplugin",
"com.intellij.java",
"com.intellij.properties",
"JUnit",
"Git4Idea",
"org.jetbrains.kotlin",
"org.jetbrains.plugins.gradle",
"org.intellij.intelliLang")
"org.jetbrains.plugins.yaml",
"org.intellij.intelliLang"
)
val pluginList = mutableListOf("Dart:$dartPluginVersion")
if (ideaProduct == "android-studio") {
bundledPluginList.add("org.jetbrains.android")
Expand Down
164 changes: 122 additions & 42 deletions flutter-idea/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ jvmVersion = when (javaVersion) {
"17" -> {
JvmTarget.JVM_17
}

"21" -> {
JvmTarget.JVM_21
}

else -> {
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
}
Expand All @@ -62,9 +64,11 @@ javaCompatibilityVersion = when (javaVersion) {
"17" -> {
JavaVersion.VERSION_17
}

"21" -> {
JavaVersion.VERSION_21
}

else -> {
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
}
Expand Down Expand Up @@ -92,12 +96,14 @@ dependencies {
// Plugin dependency documentation:
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#plugins
val bundledPluginList = mutableListOf(
"com.google.tools.ij.aiplugin",
"com.intellij.java",
"com.intellij.properties",
"JUnit",
"Git4Idea",
"org.jetbrains.kotlin",
"org.jetbrains.plugins.gradle",
"org.jetbrains.plugins.yaml",
"org.intellij.intelliLang",
)
val pluginList = mutableListOf("Dart:$dartPluginVersion")
Expand Down Expand Up @@ -178,62 +184,136 @@ dependencies {
testImplementation(mapOf("group" to "org.mockito", "name" to "mockito-core", "version" to "5.2.0"))
if (ideaProduct == "android-studio") {
testImplementation(project(":flutter-studio"))
testRuntimeOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar", "**/kotlin-stdlib-jdk8.jar"))))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar"),
"exclude" to listOf("**/annotations.jar"))))
testRuntimeOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar"))))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/plugins/git4idea/lib",
"include" to listOf("*.jar"))))
testImplementation(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/plugins/git4idea/lib",
"include" to listOf("*.jar"))))
testRuntimeOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar", "**/kotlin-stdlib-jdk8.jar")
)
)
)
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar"),
"exclude" to listOf("**/annotations.jar")
)
)
)
testRuntimeOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar")
)
)
)
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/plugins/git4idea/lib",
"include" to listOf("*.jar")
)
)
)
testImplementation(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/plugins/git4idea/lib",
"include" to listOf("*.jar")
)
)
)
} else {
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/ideaIC/plugins/git4idea/lib",
"include" to listOf("*.jar"))))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/ideaIC/plugins/java/lib",
"include" to listOf("*.jar"))))
testImplementation(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/ideaIC/plugins/git4idea/lib",
"include" to listOf("*.jar"))))
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/ideaIC/plugins/git4idea/lib",
"include" to listOf("*.jar")
)
)
)
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/ideaIC/plugins/java/lib",
"include" to listOf("*.jar")
)
)
)
testImplementation(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/ideaIC/plugins/git4idea/lib",
"include" to listOf("*.jar")
)
)
)
}
compileOnly("com.google.guava:guava:32.0.1-android")
compileOnly("com.google.code.gson:gson:2.10.1")
testImplementation("com.google.guava:guava:32.0.1-jre")
testImplementation("com.google.code.gson:gson:2.10.1")
testImplementation("junit:junit:4.13.2")
runtimeOnly(fileTree(mapOf("dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar"))))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar"))))
testImplementation(fileTree(mapOf("dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar"))))
runtimeOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar")
)
)
)
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar")
)
)
)
testImplementation(
fileTree(
mapOf(
"dir" to "${project.rootDir}/third_party/lib/jxbrowser",
"include" to listOf("*.jar")
)
)
)
}

sourceSets {
main {
java.srcDirs(listOf(
"src",
"third_party/vmServiceDrivers"
))
java.srcDirs(
listOf(
"src",
"third_party/vmServiceDrivers"
)
)
// Add kotlin.srcDirs if we start using Kotlin in the main plugin.
resources.srcDirs(listOf(
"src",
"resources"
))
resources.srcDirs(
listOf(
"src",
"resources"
)
)
}
test {
java.srcDirs(listOf(
"src",
"testSrc/unit",
"third_party/vmServiceDrivers"
))
resources.srcDirs(listOf(
"resources",
"testData",
"testSrc/unit"
))
java.srcDirs(
listOf(
"src",
"testSrc/unit",
"third_party/vmServiceDrivers"
)
)
resources.srcDirs(
listOf(
"resources",
"testData",
"testSrc/unit"
)
)
}
}

Expand Down
64 changes: 48 additions & 16 deletions flutter-studio/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ jvmVersion = when (javaVersion) {
"17" -> {
JvmTarget.JVM_17
}

"21" -> {
JvmTarget.JVM_21
}

else -> {
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
}
Expand All @@ -62,9 +64,11 @@ javaCompatibilityVersion = when (javaVersion) {
"17" -> {
JavaVersion.VERSION_17
}

"21" -> {
JavaVersion.VERSION_21
}

else -> {
throw IllegalArgumentException("javaVersion must be defined in the product matrix as either \"17\" or \"21\", but is not for $ideaVersion")
}
Expand All @@ -88,14 +92,16 @@ dependencies {
// Plugin dependency documentation:
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#plugins
val bundledPluginList = mutableListOf(
"com.google.tools.ij.aiplugin",
"com.intellij.java",
"com.intellij.properties",
"JUnit",
"Git4Idea",
"org.jetbrains.kotlin",
"org.jetbrains.plugins.gradle",
"org.intellij.intelliLang",
"org.intellij.intelliLang")
"org.jetbrains.plugins.yaml",
"org.intellij.intelliLang"
)
if (ideaProduct == "android-studio") {
bundledPluginList.add("org.jetbrains.android")
bundledPluginList.add("com.android.tools.idea.smali")
Expand Down Expand Up @@ -130,23 +136,49 @@ intellijPlatform {
dependencies {
compileOnly(project(":flutter-idea"))
testImplementation(project(":flutter-idea"))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar"))))
testImplementation(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar"))))
compileOnly(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar"))))
testImplementation(fileTree(mapOf("dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar"))))
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar")
)
)
)
testImplementation(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/lib",
"include" to listOf("*.jar")
)
)
)
compileOnly(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar")
)
)
)
testImplementation(
fileTree(
mapOf(
"dir" to "${project.rootDir}/artifacts/android-studio/plugins",
"include" to listOf("**/*.jar"),
"exclude" to listOf("**/kotlin-compiler.jar", "**/kotlin-plugin.jar")
)
)
)
}

sourceSets {
main {
java.srcDirs(listOf(
"src",
"third_party/vmServiceDrivers"
))
java.srcDirs(
listOf(
"src",
"third_party/vmServiceDrivers"
)
)
}
}