Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch the plugin.xml with readme description #14

Open
wants to merge 3 commits into
base: examples
Choose a base branch
from

Conversation

zhutmost
Copy link

As discussed in this issue, I added some code to enable automatic pluginXml patching.

Because JetBrains's org.jetbrains.changelog repository (link) is a Gradle plugin (which provides similar functions in the Gradle template), I use Laika to convert Markdown to HTML.

The main code is in project/Utils.sc. To keep compatibility, maybe you can comment out the last three lines in build.sbt (to disable the patchPluginXml task?) (but I never tried this.)

@zhutmost
Copy link
Author

The second commit is about to create GitHub action workflows to run build and release automatically. If you think it is unnecessary, feel free to revert it.

@unkarjedy
Copy link
Member

Because JetBrains's org.jetbrains.changelog repository (link) is a Gradle plugin (which provides similar functions in the Gradle template), I use Laika to convert Markdown to HTML.

In principle, we could still use it.
plugins.sbt

...
libraryDependencies += "org.jetbrains.changelog" % "org.jetbrains.changelog.gradle.plugin" % "2.2.0"
resolvers += MavenRepo("Gradle Plugins", "https://plugins.gradle.org/m2/")

Utils.scala

val readmeDescriptionMd = readmeContent.substring(startIndex + startMarker.length, endIndex).trim
org.jetbrains.changelog.ExtensionsKt.markdownToHTML(readmeDescriptionMd, "\\n")

That would allow us to reuse changelog construction logic in future (though not in this PR)

@zhutmost
Copy link
Author

I made these changes:

  1. According to your recommendation, I changed the dependency from Laika to changelog.
  2. Move the readmeDescriptionExtract function to build.sbt to simplify directory structure.
  3. Bump sbt to 1.10.0 and scala to 2.13.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants