Skip to content

Commit

Permalink
fix: fix change sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Aug 7, 2023
1 parent 0e61d89 commit 3ce2a57
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions build.gradle.kts
Expand Up @@ -23,6 +23,7 @@

import groovy.xml.XmlParser
import org.gradle.api.JavaVersion.VERSION_17
import org.jetbrains.changelog.Changelog
import org.jetbrains.intellij.tasks.PatchPluginXmlTask
import org.jetbrains.intellij.tasks.PublishPluginTask
import org.jetbrains.intellij.tasks.RunIdeTask
Expand Down Expand Up @@ -266,6 +267,27 @@ project(":plugin") {

withType<PatchPluginXmlTask> {
pluginDescription.set(provider { file("description.html").readText() })

changelog {
version.set(properties("pluginVersion"))
groups.empty()
path.set(rootProject.file("CHANGELOG.md").toString())
repositoryUrl.set(properties("pluginRepositoryUrl"))
}

val changelog = project.changelog
// Get the latest available change notes from the changelog file
changeNotes.set(properties("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),

Changelog.OutputType.HTML,
)
}
});
}

withType<PublishPluginTask> {
Expand Down Expand Up @@ -323,13 +345,6 @@ project(":") {
.forEach { it.resolve() }
}
}

changelog {
version.set(properties("pluginVersion"))
groups.empty()
path.set(layout.projectDirectory.file("CHANGELOG.md").toString())
repositoryUrl.set(properties("pluginRepositoryUrl"))
}
}

project(":pycharm") {
Expand Down

0 comments on commit 3ce2a57

Please sign in to comment.