Skip to content

[build] fix non-dev plugin version setting#303

Open
pq wants to merge 2 commits intoflutter:mainfrom
pq:build_fixProdVersion
Open

[build] fix non-dev plugin version setting#303
pq wants to merge 2 commits intoflutter:mainfrom
pq:build_fixProdVersion

Conversation

@pq
Copy link
Copy Markdown
Collaborator

@pq pq commented Apr 1, 2026

Fixes borked version setting for non-dev builds.

☁  third_party [build_fixProdVersion] ⚡  ./gradlew buildPlugin -Pdev
Calculating task graph as configuration cache cannot be reused because the set of Gradle properties has changed: 'dev' was added.

> Configure project :
plugin version: 504.0.0-dev.20260331
ideaVersion: 251 to 261.*
DART_HOME environment variable is not set. Dart Analysis Server tests will fail.
Following 1 plugins could not be created: plugins/fullLine/lib/modules/intellij.fullLine.yaml.jar

BUILD SUCCESSFUL in 4s
15 actionable tasks: 8 executed, 3 from cache, 4 up-to-date
Configuration cache entry stored.

☁  third_party [build_fixProdVersion] ⚡  ./gradlew buildPlugin      
Calculating task graph as configuration cache cannot be reused because the set of Gradle properties has changed: 'dev' was removed.

> Configure project :
plugin version: 503.0.0
ideaVersion: 251 to 261.*
DART_HOME environment variable is not set. Dart Analysis Server tests will fail.
Following 1 plugins could not be created: plugins/fullLine/lib/modules/intellij.fullLine.yaml.jar

BUILD SUCCESSFUL in 4s
15 actionable tasks: 8 executed, 3 from cache, 4 up-to-date
Configuration cache entry stored.


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

@pq pq requested a review from helin24 April 1, 2026 02:52
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 refactors the plugin versioning logic in build.gradle.kts to handle development builds more explicitly and updates the logging of version information. Feedback was provided to improve the idiomatic use of Kotlin by preferring immutable variables and conditional assignments for the version calculation logic.

@pq pq added the autosubmit When this label is applied to a PR, the PR will be submitted as soon as all checks are green. label Apr 1, 2026
val shortCommitHash = commitHash.take(7)
pluginVersion = "$pluginVersion-$shortCommitHash"
}
val latestVersion = changelog.getLatest().version
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

(This is a bit more idiomatic.)


println("plugin version: $pluginVersion")
println("ideaVersion: $ideaVersion")
println("plugin version: ${version.get()}")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These printlns were not working as expected.

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

Labels

autosubmit When this label is applied to a PR, the PR will be submitted as soon as all checks are green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant