Skip to content

Commit

Permalink
Merge pull request #201 from timja/update-plugin-description
Browse files Browse the repository at this point in the history
Update plugin description
  • Loading branch information
duemir authored Jan 7, 2025
2 parents e935a1b + 5f5663b commit a82ac2d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 30 deletions.
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,17 @@
[![Build Status](https://ci.jenkins.io/buildStatus/icon?job=Plugins%2Fidea-stapler-plugin%2Fmaster)](https://ci.jenkins.io/job/Plugins/job/idea-stapler-plugin/job/master/)
[![Join the chat at https://gitter.im/jenkinsci/idea-stapler-plugin](https://badges.gitter.im/jenkinsci/idea-stapler-plugin.svg)](https://gitter.im/jenkinsci/idea-stapler-plugin)

[//]: # (Content between "Plugin description" markers are extracted by gradle build. No markdown formatting. Simple html only.)
<!-- Plugin description -->
<p>Assists with development of Jenkins core and plugins.</p>
<p>Supports following technologies that are not covered by any other IntelliJ plugins:</p>
<ul>
<li><a href="https://stapler.kohsuke.org/">Stapler HTTP request handling engine</a></li>
<li><a href="https://commons.apache.org/proper/commons-jelly/index.html">Jelly : Executable XML</a></li>
<li><a href="https://commons.apache.org/proper/commons-jexl/">Java Expression Language (JEXL)</a></li>
</ul>
<!-- Plugin description end -->
[//]: # (Update plugin features in build.gradle as well if they are worth mentioning in key features)
## Features

Features include:

## Stapler
### Stapler

* "Go to stapler view" to jump from a Java class to its views (Cmd/Ctrl+Shift+P)
* Java Structure tool window shows Jelly views as members
* Jelly Structure tool window shows an owner class besides XML tree
* Select a string expression, then "Refactor" > "i18n for Stapler" to create a message resource

## Jelly
### Jelly

* Automatically recognized as an XML file (`*.jelly` and `*.jellytag`)
* "Jenkins Jelly View" file template to speed up creation of views
Expand Down
39 changes: 23 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,29 @@ intellij {
patchPluginXml {
sinceBuild = "233.00"
untilBuild = ""
pluginDescription = extractPluginDescription()
pluginDescription = """
<p>
Essential support for developing Jenkins plugins and Jenkins itself.
</p>
<h2>Key features</h2>
<ul>
<li>Jelly syntax highlighting</li>
<li>Displays Jelly tag documentation</li>
<li>Autocomplete Jelly tags and attributes</li>
<li>Navigation from the Jelly tags to their definitions</li>
<li>Autocomplete available Jenkins symbols for <code>l:icon src="symbol-..."</code></li>
</ul>
<h2>Adds support for</h2>
<ul>
<li><a href="https://github.com/jenkinsci/stapler/blob/master/docs/what-is.adoc">Stapler framework</a></li>
<li><a href="https://commons.apache.org/proper/commons-jelly/index.html">Jelly : Executable XML</a></li>
<li><a href="https://commons.apache.org/proper/commons-jexl/">Java Expression Language (JEXL)</a></li>
</ul>
<p>For more features see the <a href="https://github.com/jenkinsci/idea-stapler-plugin">documentation</a>.</p>
"""
changeNotes = """
<h3>3.0.6</h3>
<ul>
Expand Down Expand Up @@ -131,21 +153,6 @@ publishPlugin {
token = intellijPublishToken
}

// Avoids duplication, but hard to troubleshoot if fails. For some reason exception is not printed in the output.
// It just says: "No signature of method: build_XXX.patchPluginXml() is applicable for argument types: ..."
String extractPluginDescription() {
def final start = "<!-- Plugin description -->"
def final end = "<!-- Plugin description end -->"
try (def lines = Files.lines(file("README.md").toPath())) {
def description = lines.dropWhile({it != start})
.takeWhile({it != end})
.collect(Collectors.joining('\n'))
if (!description) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
return description
}
}

spotless {
java {
Expand Down

0 comments on commit a82ac2d

Please sign in to comment.