Skip to content

[infra] add runTarget#317

Merged
pq merged 2 commits into
flutter:mainfrom
pq:infra_runTarget
Apr 17, 2026
Merged

[infra] add runTarget#317
pq merged 2 commits into
flutter:mainfrom
pq:infra_runTarget

Conversation

@pq
Copy link
Copy Markdown
Collaborator

@pq pq commented Apr 17, 2026

Adds a parameterized runTarget Gradle task letting us run and test the plugin against multiple IDE targets (IntelliJ IDEA Community, Ultimate, and Android Studio) without changing the primary compilation classpath.

This is modeled after the approach taken in flutter-intellij PR #8910 with a few tweaks.

Key Bits

  • Centralized IDE Version: Extracts the hardcoded IDE version to gradle.properties as ideaVersion.
  • Parameterized runTarget Task: Registered a custom runTarget task using the intellijPlatformTesting extension that accepts -Pide and -PideV parameters.
  • Self-Documenting CLI: Running ./gradlew runTarget without parameters displays usage instructions and stops execution.
  • Enhanced printProductsReleases: Updates the task to include Android Studio releases and provided instructions for mapping the output to task parameters.

Differences from flutter-intellij/pull/8910

  • Fallback Version Adjustment: For the default fallback (when no parameters are provided), we use IntelliJ Community "2024.2" instead of the project's compilation target "2025.3.1.1". This avoids resolution errors caused by JetBrains changing the publication structure for Community editions starting with version 2025.3. (Note this is just for printing the help docs and not for actually running anything.)
  • Local IDE Path Support (-PidePath): We added a new parameter -PidePath to allow running against a local IDE installation (e.g., ./gradlew runTarget -PidePath=/Applications/Android\ Studio.app). This was added to bypass brittle automated resolution issues specifically associated with Android Studio releases in the new Gradle plugin.

Fixes: #316


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

@pq pq requested review from cj-radcliff and helin24 April 17, 2026 17:28
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request externalizes the IntelliJ IDEA version to gradle.properties and introduces a new runTarget task to facilitate launching various IDE types (Community, Ultimate, Android Studio) or local installations via command-line properties. The printProductsReleases task was also enhanced to support more channels and types. Feedback includes suggestions to document the hardcoded fallback version, reduce property fetching duplication, and replace println calls with the idiomatic Gradle logger.lifecycle to comply with the project's logging standards.

Comment thread third_party/build.gradle.kts
Comment thread third_party/build.gradle.kts
Comment thread third_party/build.gradle.kts
@pq pq merged commit f851826 into flutter:main Apr 17, 2026
7 of 8 checks passed
@pq pq deleted the infra_runTarget branch April 17, 2026 22:16
cj-radcliff pushed a commit that referenced this pull request Apr 28, 2026
* [infra] add `runTarget`

* + comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[infra] support running the plugin against custom target IDEs from gradle

2 participants