Skip to content

Commit d556e6b

Browse files
committed
Update Gradle, Java version, and IntelliJ platform configuration
Upgraded Gradle to v8.11.1 and Java to Corretto 17, while improving build scripts with configuration and caching options. Modernized IntelliJ platform plugin setup by aligning with the latest Gradle and Kotlin standards and adding new dependencies. Removed unused files, added SPDX license identifiers, and updated related scripts for enhanced maintainability.
1 parent fc27aaa commit d556e6b

File tree

10 files changed

+139
-767
lines changed

10 files changed

+139
-767
lines changed

.idea/git_toolbox_blame.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

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

build.gradle.kts

Lines changed: 50 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,74 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
3+
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
4+
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
25

36
fun config(name: String) = project.findProperty(name).toString()
47

58
repositories {
69
mavenCentral()
10+
11+
intellijPlatform {
12+
defaultRepositories()
13+
}
714
}
815

916
plugins {
1017
java
1118
// https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
12-
kotlin("jvm") version "1.5.10"
13-
id("org.jetbrains.intellij") version "1.9.0"
19+
alias(libs.plugins.kotlin) // Kotlin support
20+
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
1421
}
1522

1623
group = config("group")
1724
version = config("version")
1825

1926
dependencies {
20-
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.10")
21-
implementation("io.sentry:sentry:6.4.3")
22-
testImplementation(kotlin("test"))
23-
testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.0")
27+
implementation(libs.sentry)
28+
testImplementation(libs.junit)
29+
30+
intellijPlatform {
31+
create(config("platformType"), config("platformVersion"))
32+
val plugins = providers.gradleProperty("plugins").map { it.split(',') }
33+
if (plugins.isPresent && plugins.get().isNotEmpty()) {
34+
plugins(plugins)
35+
}
36+
val platformBundledPlugins = providers.gradleProperty("platformBundledPlugins").map { it.split(',') }
37+
if (platformBundledPlugins.isPresent && platformBundledPlugins.get().isNotEmpty()) {
38+
bundledPlugins(platformBundledPlugins)
39+
}
40+
41+
instrumentationTools()
42+
pluginVerifier()
43+
zipSigner()
44+
testFramework(TestFrameworkType.Platform)
45+
}
2446
}
2547

26-
intellij {
27-
pluginName.set(config("pluginName"))
28-
version.set(
29-
if (config("platformVersion") == "eap") {
30-
"LATEST-EAP-SNAPSHOT"
31-
} else {
32-
config("platformVersion")
33-
}
34-
)
35-
type.set(config("platformType"))
36-
updateSinceUntilBuild.set(false)
37-
38-
val usePlugins = config("usePlugins").split(',')
39-
for (plugin in usePlugins) {
40-
if (plugin.isEmpty()) {
41-
continue
48+
intellijPlatform {
49+
pluginConfiguration {
50+
name.set(config("pluginName"))
51+
version.set(project.version.toString())
52+
description.set(file("description.html").readText())
53+
changeNotes.set(readChangeNotes("CHANGES.md"))
54+
ideaVersion {
55+
sinceBuild.set(config("platformSinceBuild"))
4256
}
43-
val (name, version) = plugin.split(':')
44-
if (name == "python") {
45-
when (type.get()) {
46-
"PY" -> {
47-
plugins.add("python")
48-
}
49-
50-
"PC" -> {
51-
plugins.add("PythonCore")
52-
}
53-
54-
else -> {
55-
plugins.add("PythonCore:${version}")
56-
}
57-
}
58-
} else {
59-
plugins.add(plugin)
57+
}
58+
59+
buildSearchableOptions = false
60+
61+
pluginVerification.ides {
62+
recommended()
63+
}
64+
65+
publishing {
66+
try {
67+
token.set(file("token.txt").readLines()[0])
68+
} catch (e: Exception) {
69+
println("No token.txt found")
6070
}
71+
channels.set(listOf(config("publishChannel")))
6172
}
6273
}
6374

@@ -115,21 +126,4 @@ tasks {
115126

116127
maxHeapSize = "1G"
117128
}
118-
119-
patchPluginXml {
120-
version.set(project.version.toString())
121-
pluginDescription.set(file("description.html").readText())
122-
changeNotes.set(readChangeNotes("CHANGES.md"))
123-
sinceBuild.set(config("platformSinceBuild"))
124-
}
125-
126-
publishPlugin {
127-
dependsOn("buildPlugin")
128-
token.set(file("token.txt").readLines()[0])
129-
channels.set(listOf(config("publishChannel")))
130-
}
131-
132-
buildSearchableOptions {
133-
enabled = false
134-
}
135129
}

gradle.properties

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
# Gradle
2-
gradleVersion=7.5.1
2+
gradleVersion=8.11.1
33
org.gradle.parallel=true
4+
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
5+
org.gradle.configuration-cache = true
6+
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
7+
org.gradle.caching = true
48
# https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#intellij-platform-based-products-of-recent-ide-versions
5-
jvmVersion=11
9+
jvmVersion=17
610
#
711
# Plugin
812
group=dev.meanmail
913
repository=https://github.com/meanmail-dev/prettify-python-plugin
1014
pluginName=Prettify python
11-
version=2022.1
15+
version=2024.1
1216
# https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
1317
kotlin.stdlib.default.dependency=false
1418
#
1519
# Platform
16-
platformSinceBuild=212
20+
platformSinceBuild=224
1721
# Develop platform
18-
platformVersion=2022.2.2
22+
platformVersion=2024.3
1923
platformType=PC
20-
usePlugins=python:222.4167.37
24+
#plugins=
25+
#platformBundledPlugins=PythonCore
2126
#
2227
# Publish
2328
publishChannel=Stable

gradle/libs.versions.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[versions]
2+
# libraries
3+
junit = "4.13.2"
4+
sentry = "7.19.0"
5+
6+
# plugins
7+
intelliJPlatform = "2.1.0"
8+
kotlin = "1.9.25"
9+
10+
[libraries]
11+
junit = { group = "junit", name = "junit", version.ref = "junit" }
12+
sentry = { group = "io.sentry", name = "sentry", version.ref = "sentry" }
13+
14+
[plugins]
15+
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
16+
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

-15.6 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

Lines changed: 31 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 21 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)