Skip to content

Commit cd14fc2

Browse files
lisachenkoclaude
andcommitted
fix: resolve valueof(GradlePropertyValueSource) in artifact filename
- Update IntelliJ Platform Gradle Plugin from 2.13.1 to 2.16.0 - Work around Gradle 9.0 Provider resolution bug where the plugin sets project.version to an unresolved Provider whose toString() returns "valueof(GradlePropertyValueSource)" instead of the actual version - afterEvaluate restores project.version to the resolved string so buildPlugin creates GoAOPPlugin-2.0.0.zip instead of the broken name Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 779c165 commit cd14fc2

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

build.gradle.kts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@ plugins {
1616
}
1717

1818
group = properties("pluginGroup").get()
19-
version = properties("pluginVersion").get()
19+
20+
// Work around Provider resolution issue in IntelliJ Platform Gradle Plugin with Gradle 9.0:
21+
// the plugin sets project.version to an unresolved Provider whose toString() yields
22+
// "valueof(GradlePropertyValueSource)" instead of the actual version string.
23+
// afterEvaluate overrides it back to a plain String so the artifact filename is correct.
24+
val pluginVer: String = file("gradle.properties").readLines()
25+
.first { it.startsWith("pluginVersion") }
26+
.substringAfter("= ")
27+
.trim()
28+
afterEvaluate {
29+
version = pluginVer
30+
}
2031

2132
repositories {
2233
mavenCentral()
@@ -133,7 +144,7 @@ tasks {
133144
}
134145

135146
patchPluginXml {
136-
version = properties("pluginVersion")
147+
version = pluginVer
137148
sinceBuild = properties("pluginSinceBuild")
138149
untilBuild = provider { null }
139150

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mockitoKotlin = "5.4.0"
77
# plugins
88
kotlin = "2.2.0"
99
changelog = "2.2.0"
10-
intellijPlatformGradle = "2.13.1"
10+
intellijPlatformGradle = "2.16.0"
1111
qodana = "2023.3.1"
1212
kover = "0.7.6"
1313
grammarkit = "2022.3.2"

0 commit comments

Comments
 (0)