-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
83 lines (71 loc) · 2.12 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
83 lines (71 loc) · 2.12 KB
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
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
fun prop(key: String): String =
providers.gradleProperty(key).orNull
?: error("Missing gradle.properties key: $key")
plugins {
id("java")
id("org.jetbrains.intellij.platform") version "2.18.1"
}
group = prop("pluginGroup")
version = prop("pluginVersion")
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
phpstorm(prop("platformVersion"))
bundledPlugin("com.jetbrains.php")
pluginVerifier()
}
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
intellijPlatform {
instrumentCode = false
// Keep false for sandbox auto-reload and single-instance CI safety.
buildSearchableOptions = false
autoReload = true
pluginConfiguration {
// Keep version in sync with gradle.properties (description/change-notes stay in plugin.xml).
version = prop("pluginVersion")
ideaVersion {
sinceBuild = prop("pluginSinceBuild")
// Open-ended when pluginUntilBuild is blank — required for PhpStorm 2026.2+ installs.
// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
val until = prop("pluginUntilBuild").trim()
if (until.isEmpty()) {
untilBuild = provider { null }
} else {
untilBuild = until
}
}
}
pluginVerification {
ides {
// Same PhpStorm we compile against — keeps CI time/bandwidth predictable.
// Expand with recommended() / select { ... } when you want a wider matrix.
create(IntelliJPlatformType.PhpStorm, prop("platformVersion"))
}
}
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
options.release.set(21)
}
wrapper {
gradleVersion = prop("gradleVersion")
}
runIde {
autoReload = true
jvmArgumentProviders += CommandLineArgumentProvider {
listOf("-XX:+UnlockDiagnosticVMOptions")
}
}
}