Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 26 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ plugins {
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
id("java") // Java support
id("org.jetbrains.intellij.platform") version "2.12.0" // IntelliJ Platform Gradle Plugin
id("org.jetbrains.kotlin.jvm") version "2.2.0" // Kotlin support
id("org.jetbrains.kotlin.jvm") version "2.3.20" // Kotlin support
id("org.jetbrains.changelog") version "2.2.0" // Gradle Changelog Plugin
id("org.jetbrains.kotlinx.kover") version "0.9.4"
idea // IntelliJ IDEA support
Expand Down Expand Up @@ -103,7 +103,7 @@ jvmVersion = when (javaVersion) {

kotlin {
compilerOptions {
apiVersion.set(KotlinVersion.KOTLIN_2_1)
apiVersion.set(KotlinVersion.KOTLIN_2_3)
jvmTarget = jvmVersion
}
// This is how you specify the specific JVM requirements, this may be a requirement for the Starter test framework
Expand Down Expand Up @@ -155,6 +155,21 @@ sourceSets {
"resources"
)
)
java.exclude("**/AndroidStudioGradleSyncProvider.java")
java.exclude("**/GradleUtils.java")
java.exclude("**/FlutterExternalSystemTaskNotificationListener.java")
java.exclude("**/AndroidLocationProvider.java")
java.exclude("**/FlutterStudioStartupActivity.java")
java.exclude("**/OpenAndroidModule.java")
java.exclude("**/AddToAppUtils.java")

kotlin.exclude("**/AndroidStudioGradleSyncProvider.java")
kotlin.exclude("**/GradleUtils.java")
kotlin.exclude("**/FlutterExternalSystemTaskNotificationListener.java")
kotlin.exclude("**/AndroidLocationProvider.java")
kotlin.exclude("**/FlutterStudioStartupActivity.java")
kotlin.exclude("**/OpenAndroidModule.java")
kotlin.exclude("**/AddToAppUtils.java")
Comment on lines +160 to +174
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[CONCERN] The list of excluded files is duplicated for both Java and Kotlin source sets. This violates the DRY (Don't Repeat Yourself) principle and increases the maintenance burden. Consider defining the list once and applying it to both source sets.

    val androidStudioExcludes = listOf(
      "**/AndroidStudioGradleSyncProvider.java",
      "**/GradleUtils.java",
      "**/FlutterExternalSystemTaskNotificationListener.java",
      "**/AndroidLocationProvider.java",
      "**/FlutterStudioStartupActivity.java",
      "**/OpenAndroidModule.java",
      "**/AddToAppUtils.java"
    )
    java.exclude(androidStudioExcludes)
    kotlin.exclude(androidStudioExcludes)

}
test {
java.srcDirs(
Expand Down Expand Up @@ -202,7 +217,8 @@ dependencies {
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html#default-target-platforms
// Android Studio versions can be found at: https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
try {
androidStudio(ideaVersion)
// androidStudio(ideaVersion)
intellijIdeaUltimate(ideaVersion)
} catch (e: Exception) {
throw GradleException(
"Failed to resolve Android Studio / IDEA download URL. This is likely due to a network issue blocking the download URL. Please check your internet connection or VPN.",
Expand All @@ -223,14 +239,18 @@ dependencies {
"JUnit",
"Git4Idea",
"org.jetbrains.kotlin",
"org.jetbrains.plugins.gradle",
// "org.jetbrains.plugins.gradle",
"org.jetbrains.plugins.yaml",
"org.intellij.intelliLang",
"org.jetbrains.android",
"com.android.tools.idea.smali"
// "org.jetbrains.android",
// "com.android.tools.idea.smali"
)
)
plugin("Dart:$dartPluginVersion")
plugin("org.jetbrains.android:261.22158.277")
plugin("org.jetbrains.plugins.gradle:261.22158.182")
// this doesn't seem to make a difference
// plugin("com.android.tools.idea.smali:261.22158.182")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[CONCERN] This commented-out plugin and the accompanying note ("this doesn't seem to make a difference") should be removed to keep the build file clean and free of dead code.


if (sinceBuildInput == "243" || sinceBuildInput == "251") {
bundledModule("intellij.platform.coverage")
Expand Down
7 changes: 4 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
# found in the LICENSE file.
#

ideaVersion=2025.2.3.9
ideaVersion=2026.1
dartPluginVersion= 503.0.0
# Also update the versions for verify checks in tool/github.sh.
sinceBuild=251
untilBuild=261.*
sinceBuild=261
untilBuild=262.*
javaVersion=21
kotlin.stdlib.default.dependency=false
org.gradle.parallel=true
org.gradle.jvmargs=-Xms1024m -Xmx4048m

org.gradle.caching=true
org.gradle.configuration-cache=true
token=dummy
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

[CONCERN] The addition of token=dummy appears to be a leftover from local development or CI testing. Unless this property is strictly required by the build system, it should be removed to maintain a clean configuration file.

15 changes: 9 additions & 6 deletions src/io/flutter/run/LaunchState.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import com.intellij.xdebugger.XDebugProcessStarter;
import com.intellij.xdebugger.XDebugSession;
import com.intellij.xdebugger.XDebuggerManager;
import com.intellij.xdebugger.XSessionStartedResult;
import com.jetbrains.lang.dart.ide.runner.DartExecutionHelper;
import com.jetbrains.lang.dart.util.DartUrlResolver;
import io.flutter.FlutterConstants;
Expand Down Expand Up @@ -224,28 +225,30 @@ protected void showNoDeviceConnectedMessage(Project project) {
}

@NotNull
protected XDebugSession createDebugSession(@NotNull final ExecutionEnvironment env,
@NotNull final FlutterApp app,
@NotNull final ExecutionResult executionResult)
protected XSessionStartedResult createDebugSession(@NotNull final ExecutionEnvironment env,
@NotNull final FlutterApp app,
@NotNull final ExecutionResult executionResult)
throws ExecutionException {

final DartUrlResolver resolver = DartUrlResolver.getInstance(env.getProject(), sourceLocation);
final FlutterPositionMapper mapper = createPositionMapper(env, app, resolver);

final XDebuggerManager manager = XDebuggerManager.getInstance(env.getProject());
final XDebugSession session = manager.startSession(env, new XDebugProcessStarter() {
final XSessionStartedResult startedResult = manager.newSessionBuilder(new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) {
return new FlutterDebugProcess(app, env, session, executionResult, resolver, mapper);
}
});
}).environment(env).startSession();

final XDebugSession session = startedResult.getSession();

if (app.getMode() != RunMode.DEBUG) {
session.setBreakpointMuted(true);
}

return session;
return startedResult;
}

@NotNull
Expand Down
7 changes: 4 additions & 3 deletions src/io/flutter/run/bazelTest/BazelTestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.intellij.xdebugger.XDebugSession;
import com.intellij.xdebugger.XDebuggerManager;
import com.jetbrains.lang.dart.sdk.DartSdkLibUtil;
import com.intellij.xdebugger.XSessionStartedResult;
import com.jetbrains.lang.dart.util.DartUrlResolver;
import io.flutter.FlutterMessages;
import io.flutter.FlutterUtils;
Expand Down Expand Up @@ -100,15 +101,15 @@ protected RunContentDescriptor runInDebugger(@NotNull BazelTestLaunchState launc

// Create the debug session.
final XDebuggerManager manager = XDebuggerManager.getInstance(env.getProject());
final XDebugSession session = manager.startSession(env, new XDebugProcessStarter() {
final XSessionStartedResult result = manager.newSessionBuilder(new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) {
return new BazelTestDebugProcess(env, session, executionResult, resolver, connector, mapper);
}
});
}).environment(env).startSession();

return session.getRunContentDescriptor();
return result.getRunContentDescriptor();
}

/**
Expand Down
7 changes: 4 additions & 3 deletions src/io/flutter/run/test/FlutterTestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import com.intellij.xdebugger.XDebugSession;
import com.intellij.xdebugger.XDebuggerManager;
import com.jetbrains.lang.dart.util.DartUrlResolver;

import io.flutter.FlutterUtils;
import io.flutter.ObservatoryConnector;
import io.flutter.logging.PluginLogger;
Expand Down Expand Up @@ -210,15 +211,15 @@ protected RunContentDescriptor runInDebugger(@NotNull TestLaunchState launcher,

// Create the debug session.
final XDebuggerManager manager = XDebuggerManager.getInstance(env.getProject());
final XDebugSession session = manager.startSession(env, new XDebugProcessStarter() {
final var result = manager.newSessionBuilder(new XDebugProcessStarter() {
@Override
@NotNull
public XDebugProcess start(@NotNull final XDebugSession session) {
return new TestDebugProcess(env, session, executionResult, resolver, connector, mapper);
}
});
}).environment(env).startSession();

return session.getRunContentDescriptor();
return result.getRunContentDescriptor();
}

/**
Expand Down
Loading