@@ -98,7 +98,7 @@ dependencies {
9898
9999intellijPlatform {
100100 pluginConfiguration {
101- version = providers.gradleProperty(" pluginVersion" )
101+ version = providers.gradleProperty(" pluginVersion" ).map { it.substringBefore( ' - ' , " " ) }
102102 description =
103103 providers.fileContents(layout.projectDirectory.file(" README.md" )).asText.map {
104104 val start = " <!-- Plugin description -->"
@@ -114,16 +114,19 @@ intellijPlatform {
114114
115115 val changelog = project.changelog
116116 changeNotes =
117- providers.gradleProperty(" pluginVersion" ).map { pluginVersion ->
118- with (changelog) {
119- renderItem(
120- (getOrNull(pluginVersion) ? : getUnreleased())
121- .withHeader(false )
122- .withEmptySections(false ),
123- Changelog .OutputType .HTML ,
124- )
117+ providers
118+ .gradleProperty(" pluginVersion" )
119+ .map { it.substringBefore(' -' , " " ) }
120+ .map { pluginVersion ->
121+ with (changelog) {
122+ renderItem(
123+ (getOrNull(pluginVersion) ? : getUnreleased())
124+ .withHeader(false )
125+ .withEmptySections(false ),
126+ Changelog .OutputType .HTML ,
127+ )
128+ }
125129 }
126- }
127130
128131 ideaVersion {
129132 sinceBuild = providers.gradleProperty(" pluginSinceBuild" )
@@ -138,6 +141,8 @@ intellijPlatform {
138141 }
139142
140143 publishing {
144+ // TODO: During release, refrain from reformatting the version number.
145+ // Instead, set the release version before tagging to allow releases to any chosen channel.
141146 token = providers.environmentVariable(" PUBLISH_TOKEN" )
142147 version =
143148 providers.gradleProperty(" pluginVersion" ).map { it.substringBefore(' -' , " " ) }
0 commit comments