Skip to content

Commit

Permalink
update groovy usage to actually work with 2.0.0
Browse files Browse the repository at this point in the history
- changed, SimpleDateFormat to ExtensionsKt.date, otherwise the import
  is not used.

- removed, import for SimpleDateFormat

- added, import for Changelog, otherwise get errors on
  Changelog.OutputType.HTML

- added, provider for changeNotes assignment, otherwise get errors
  • Loading branch information
vsch authored and hsz committed Jun 1, 2023
1 parent f15931d commit f3c3bdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ changelog {
**build.gradle** (Groovy)

```groovy
import java.text.SimpleDateFormat
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.ChangelogSectionUrlBuilder
import org.jetbrains.changelog.ExtensionsKt
Expand All @@ -112,7 +112,7 @@ intellij {
// ...
patchPluginXml {
changeNotes = {
changeNotes = provider {
changelog.renderItem(
changelog
.getUnreleased()
Expand All @@ -126,8 +126,8 @@ intellij {
changelog {
version = "1.0.0"
path = file("CHANGELOG.md").cannonicalPath
header = "[${-> version.get()}] - ${new SimpleDateFormat("yyyy-MM-dd").format(new Date())}"
path = file("CHANGELOG.md").canonicalPath
header = "[${-> version.get()}] - ${ExtensionsKt.date("yyyy-MM-dd")}"
headerParserRegex = ~/(\d+\.\d+)/
introduction = """
My awesome project that provides a lot of useful features, like:
Expand Down

0 comments on commit f3c3bdb

Please sign in to comment.