Skip to content

Commit 93cbb2b

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents f78604f + ff5992f commit 93cbb2b

File tree

10 files changed

+82
-107
lines changed

10 files changed

+82
-107
lines changed

.github/workflows/check-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
strategy:
2727
matrix:
28-
java: [17, 21]
28+
java: [21]
2929
distribution: [temurin]
3030

3131
steps:
@@ -79,7 +79,7 @@ jobs:
7979

8080
strategy:
8181
matrix:
82-
java: [17]
82+
java: [21]
8383
distribution: [temurin]
8484

8585
steps:
@@ -101,7 +101,7 @@ jobs:
101101

102102
strategy:
103103
matrix:
104-
java: [17]
104+
java: [21]
105105
distribution: [temurin]
106106

107107
steps:

.github/workflows/checkIDECompatibility.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up JDK
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: '17'
20+
java-version: '21'
2121
distribution: 'temurin'
2222
cache: 'gradle'
2323

@@ -106,7 +106,7 @@ jobs:
106106
uses: actions/setup-java@v4
107107
with:
108108
distribution: 'temurin'
109-
java-version: 17
109+
java-version: 21
110110
cache: 'gradle'
111111

112112
- name: Init Git and pull

.github/workflows/sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/setup-java@v4
5050
with:
5151
distribution: 'temurin'
52-
java-version: 17
52+
java-version: 21
5353

5454
- name: Cache SonarCloud packages
5555
uses: actions/cache@v4

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/setup-java@v4
1414
with:
1515
distribution: 'temurin'
16-
java-version: 17
16+
java-version: 21
1717
cache: 'gradle'
1818

1919
- name: Update/Generify version

.run/Run Tests.run.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<option name="executionName" />
66
<option name="externalProjectPath" value="$PROJECT_DIR$" />
77
<option name="externalSystemIdString" value="GRADLE" />
8-
<option name="scriptParameters" value="" />
8+
<option name="scriptParameters" value="-PskipPMD" />
99
<option name="taskDescriptions">
1010
<list />
1111
</option>
@@ -19,6 +19,7 @@
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>false</RunAsTest>
2223
<method v="2" />
2324
</configuration>
24-
</component>
25+
</component>

.run/Run Verifications.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</option>
1212
<option name="taskNames">
1313
<list>
14-
<option value="runPluginVerifier" />
14+
<option value="verifyPlugin" />
1515
</list>
1616
</option>
1717
<option name="vmOptions" value="" />

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We also encourage you to read the [contribution instructions by GitHub](https://
1919
### Software Requirements
2020
You should have the following things installed:
2121
* Git
22-
* Java 17 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
22+
* Java 21 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
2323
* Gradle (shipped inside the repo as Gradle Wrapper - also available inside IntelliJ)
2424

2525
### Recommended setup

build.gradle

Lines changed: 64 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ plugins {
33
id 'idea'
44
id 'checkstyle'
55
id 'pmd'
6-
id 'org.jetbrains.intellij' version '1.17.4'
6+
id 'org.jetbrains.intellij.platform' version '2.0.1'
77
id 'org.sonarqube' version '5.1.0.4882'
88
}
99

1010
ext {
1111
checkstyleVersion = '10.18.1'
12+
pmdVersion = '7.5.0'
1213
}
1314

1415
def properties(String key) {
@@ -19,7 +20,7 @@ def environment(String key) {
1920
return providers.environmentVariable(key)
2021
}
2122

22-
apply plugin: 'org.jetbrains.intellij'
23+
apply plugin: 'org.jetbrains.intellij.platform'
2324
apply plugin: 'java'
2425
apply plugin: 'checkstyle'
2526

@@ -30,6 +31,10 @@ version = properties("pluginVersion").get()
3031
// Add build script repository to maven central
3132
repositories {
3233
mavenCentral()
34+
intellijPlatform {
35+
defaultRepositories()
36+
jetbrainsRuntime()
37+
}
3338
}
3439

3540
// https://github.com/gradle/gradle/issues/27035
@@ -41,7 +46,17 @@ configurations.checkstyle {
4146

4247
// Add dependencies to test, junit5 api (annotations) and engine (runtime)
4348
dependencies {
49+
intellijPlatform {
50+
create(properties("platformType"), properties("platformVersion"))
51+
bundledPlugins(properties("platformBundledPlugins").map { it.split(",").collect { it.trim() }.findAll { !it.empty } })
52+
plugins(properties("platformPlugins").map { it.split(",").collect { it.trim() }.findAll { !it.empty } })
53+
pluginVerifier()
54+
zipSigner()
55+
instrumentationTools()
56+
}
4457
checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
58+
pmd "net.sourceforge.pmd:pmd-ant:${pmdVersion}",
59+
"net.sourceforge.pmd:pmd-java:${pmdVersion}"
4560
testImplementation platform('org.junit:junit-bom:5.11.0'),
4661
'org.junit.jupiter:junit-jupiter',
4762
'org.junit.jupiter:junit-jupiter-engine',
@@ -55,21 +70,36 @@ dependencies {
5570
// This needs to fit the tag <idea-version since-build="xxx"> in plugin.xml
5671
// See https://www.jetbrains.com/intellij-repository/snapshots
5772
// See https://www.jetbrains.com/intellij-repository/releases
58-
intellij {
59-
pluginName = properties("pluginName")
60-
61-
version = properties("platformVersion")
62-
type = properties("platformType")
63-
64-
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
65-
plugins = properties("platformPlugins").map { it.split(",").collect { it.trim() }.findAll { !it.empty } }
66-
67-
updateSinceUntilBuild = false
68-
}
69-
70-
71-
listProductsReleases {
72-
sinceBuild = "241.*"
73+
intellijPlatform {
74+
pluginConfiguration {
75+
name = properties("pluginName")
76+
version = properties("pluginVersion")
77+
}
78+
patchPluginXml {
79+
pluginId = properties("pluginGroup")
80+
pluginName = properties("pluginName")
81+
pluginVersion = properties("pluginVersion")
82+
sinceBuild = properties("platformSinceBuild")
83+
untilBuild = provider { null }
84+
}
85+
pluginVerification {
86+
ides {
87+
recommended()
88+
}
89+
}
90+
signPlugin {
91+
certificateChain = environment("CERTIFICATE_CHAIN")
92+
privateKey = environment("PRIVATE_KEY")
93+
password = environment("PRIVATE_KEY_PASSWORD")
94+
}
95+
publishPlugin {
96+
token = environment("PUBLISH_TOKEN")
97+
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
98+
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
99+
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
100+
channels = properties("pluginVersion")
101+
.map { [((it.split('-') as List)[1] ?: "default").split('\\.').find { true }.toLowerCase()] }
102+
}
73103
}
74104

75105
checkstyle {
@@ -82,18 +112,23 @@ checkstyle {
82112
pmd {
83113
consoleOutput = true
84114
ruleSetFiles = files(".config/pmd/ruleset.xml")
115+
toolVersion = pmdVersion
85116
}
86117

87118
tasks.withType(Checkstyle).configureEach {
88119
enabled = project.hasProperty("checkstyleEnabled");
89120
}
90121

122+
tasks.withType(Pmd).configureEach {
123+
enabled = !project.hasProperty("skipPMD")
124+
}
125+
91126
// Configure compileJava AND compileTestJava
92127
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.compile.JavaCompile.html
93128
tasks.withType(JavaCompile).configureEach {
94129
// JAVA compatibility
95-
sourceCompatibility = JavaVersion.VERSION_17
96-
targetCompatibility = JavaVersion.VERSION_17
130+
sourceCompatibility = JavaVersion.VERSION_21
131+
targetCompatibility = JavaVersion.VERSION_21
97132
}
98133

99134
compileJava.options.encoding = 'UTF-8'
@@ -105,6 +140,16 @@ test {
105140
useJUnitPlatform()
106141
}
107142

143+
sonar {
144+
properties {
145+
// Ignore sonar warnings globally
146+
property 'sonar.issue.ignore.multicriteria', 'S1948'
147+
// Ignore serialization waring as it's only relevant for RMI which is not used
148+
property 'sonar.issue.ignore.multicriteria.S1948.ruleKey', 'java:S1948'
149+
property 'sonar.issue.ignore.multicriteria.S1948.resourceKey', '**/*.java'
150+
}
151+
}
152+
108153
// Add resources directory because intellij test framework checks there for test resources (instead of build/resources)
109154
sourceSets {
110155
test.output.resourcesDir = "build/classes/java/resources"
@@ -114,23 +159,4 @@ tasks {
114159
wrapper {
115160
gradleVersion = properties("gradleVersion").get()
116161
}
117-
118-
patchPluginXml {
119-
version = properties("pluginVersion")
120-
}
121-
122-
signPlugin {
123-
certificateChain = environment("CERTIFICATE_CHAIN")
124-
privateKey = environment("PRIVATE_KEY")
125-
password = environment("PRIVATE_KEY_PASSWORD")
126-
}
127-
128-
publishPlugin {
129-
token = environment("PUBLISH_TOKEN")
130-
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
131-
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
132-
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
133-
channels = properties("pluginVersion")
134-
.map { [((it.split('-') as List)[1] ?: "default").split('\\.').find { true }.toLowerCase()] }
135-
}
136162
}

gradle.properties

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ pluginName=Save Actions X
55
pluginVersion=1.2.4-SNAPSHOT
66
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
77
platformType=IC
8-
platformVersion=2024.1.6
8+
platformVersion=2024.2.2
9+
platformSinceBuild=242
910
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
10-
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
11-
platformPlugins=java
11+
# Example: platformBundledPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
12+
platformBundledPlugins=java
13+
platformPlugins=
1214
# Gradle Releases -> https://github.com/gradle/gradle/releases
13-
gradleVersion=8.9
15+
gradleVersion=8.10.1
1416
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
1517
org.gradle.configuration-cache=true
1618
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html

0 commit comments

Comments
 (0)