-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
158 lines (143 loc) Β· 5.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import java.nio.file.Files
import java.util.stream.Collectors
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.17.4'
id 'com.diffplug.spotless' version '6.25.0'
}
group = "org.kohsuke.stapler.idea"
version = "3.0.6"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
mavenCentral()
maven {
url "https://repo.jenkins-ci.org/releases/"
}
}
dependencies {
implementation('org.jenkins-ci:commons-jexl:1.1-jenkins-20111212') {
// Provided by the Platform
exclude group: "commons-logging", module: "commons-logging"
}
implementation 'net.java.dev.textile-j:textile-j:2.2.864'
implementation 'org.apache.commons:commons-text:1.13.0'
implementation('io.jenkins.plugins:ionicons-api:74.v93d5eb_813d5f') {
artifact {
name = "ionicons-api"
type = "jar" // Force Gradle to use the JAR artifact
}
}
testImplementation 'junit:junit:4.13.2'
}
tasks.withType(JavaCompile) {
//enable compiler warnings
options.deprecation = true
options.compilerArgs << "-Xlint:all"
// write them to a file so that Warnings NG plugin can parse them.
doFirst {
logging.addStandardErrorListener({ message ->
file("${buildDir}/javac.log") << message
} as StandardOutputListener)
}
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
// https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
// https://plugins.jetbrains.com/docs/marketplace/product-versions-in-use-statistics.html
// https://www.jetbrains.com/idea/download/other.html
intellij {
version = ideaVersion
type = ideaType
plugins = platformPlugins.tokenize(',')*.trim()
}
patchPluginXml {
sinceBuild = "233.00"
untilBuild = ""
pluginDescription = extractPluginDescription()
changeNotes = """
<h3>3.0.6</h3>
<ul>
<li>π Jenkins Symbols suggestions are now available when using the icon component</li>
</ul>
<h3>3.0.5</h3>
<ul>
<li>π Use JetBrains Marketplace exception analyzer</li>
<li>π» Compatibility baseline is changed to 2023.3</li>
</ul>
<h3>3.0.4</h3>
<ul>
<li>π Clean up API usage to remain compatible with 2024.2</li>
</ul>
<h3>3.0.3</h3>
<ul>
<li>π» Compatibility baseline is changed to 2022.3 which also changes Java level to 17. No functional changes are expected.</li>
<li>π Report custom tag attributes that are marked deprecated.</li>
</ul>
<h3>3.0.2</h3>
<ul>
<li>βοΈ Usages of Apache commons-lang2 are removed for IntelliJ compatibility reasons</li>
<li>π¦ Build tools are upgrade</li>
<li><a href="https://github.com/jenkinsci/idea-stapler-plugin/releases/tag/3.0.2">GitHub Release Notes</a></li>
</ul>
<h3>3.0.1</h3>
<ul>
<li>π Update Jelly Tag Library XSDs.</li>
<li>π Add support for groovy views as well as help files in the structure view.</li>
<li>π Offer this plugin when a project has dependency on org.jenkins-ci.main:jenkins-core</li>
<li><a href="https://github.com/jenkinsci/idea-stapler-plugin/releases/tag/3.0.1">GitHub Release Notes</a></li>
</ul>
<h3>3.0.0</h3>
<ul>
<li>π₯ Unused Stapler Facet is removed. You might get a warning about it from IntelliJ. Unreadable facet can be safely removed.</li>
<li>π Add 'since' attribute to the 'attribute' tag of the Stapler tag library</li>
<li>π Fix exception caused by i18n with single-quote</li>
<li><a href="https://github.com/jenkinsci/idea-stapler-plugin/releases/tag/3.0.0">GitHub Release Notes</a></li>
</ul>
<h3>2.1.0</h3>
<ul>
<li>π <strong>Views are shown in the Class' Structure tool window.</strong></li>
<li>π Jelly is now its own separate file type with its own icon</li>
<li>π A file template is added for a Jenkins Jelly View</li>
<li>π Fix "IllegalArgumentException: Invalid range specified: (1, -1)" when editing style attribute in Jelly files</li>
</ul>
<h3>2.0.8</h3>
<h4>Plugin is renamed from "Stapler Framework Support" to "Jenkins Development Support"</h4>
"""
}
runPluginVerifier {
subsystemsToCheck = "without-android"
}
listProductsReleases {
sinceVersion = sinceIdeaVersion ?: ideaVersion
}
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 {
palantirJavaFormat('2.39.0').formatJavadoc(true)
indentWithSpaces()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}