-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
134 lines (116 loc) · 4.82 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
134 lines (116 loc) · 4.82 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
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
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "2.3.0"
id("org.jetbrains.intellij.platform") version "2.12.0"
}
group = "io.github.barsia"
version = "0.1.9"
val localProps = rootProject.file("local.properties")
.takeIf { it.exists() }
?.readLines()
?.filter { it.contains('=') && !it.startsWith("#") }
?.associate { it.substringBefore('=').trim() to it.substringAfter('=').trim() }
?: emptyMap()
fun localProp(key: String): String = localProps[key] ?: ""
val localIdePath: String = localProp("ideaPath")
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
dependencies {
intellijPlatform {
local(localIdePath)
testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform)
// Add plugin dependencies for compilation here:
bundledPlugin("com.intellij.modules.json")
bundledPlugin("org.jetbrains.plugins.yaml")
bundledPlugin("org.intellij.plugins.markdown")
bundledPlugin("Git4Idea")
}
testImplementation("junit:junit:4.13.2")
}
intellijPlatform {
pluginConfiguration {
ideaVersion {
sinceBuild = "253.32098.37"
untilBuild = "263.*"
}
changeNotes = """
<h3>0.1.9</h3>
<ul>
<li>Run several test cases together in a single multi-case test run</li>
<li>Set the overall run result from a dropdown, with per-case manual overrides</li>
<li>Reset all results, or expand and collapse all cases, in one action</li>
<li>Resolve Duplicate IDs now lists every file sharing an ID and marks the keeper</li>
<li>Links in the preview render as links you can open, edit, or add from the toolbar</li>
<li>The preview is now fully keyboard-navigable</li>
<li>A focus ring now shows only for keyboard focus, not mouse clicks</li>
<li>The step drag handle is now keyboard-operable</li>
<li>Focus returns to where you were after closing a dialog</li>
<li>Fixed the preview desyncing after undoing an added step</li>
</ul>
""".trimIndent()
}
pluginVerification {
ides {
recommended()
}
}
signing {
certificateChain = providers.provider { localProp("certificateChain").ifEmpty { null } }
.orElse(providers.environmentVariable("CERTIFICATE_CHAIN"))
privateKey = providers.provider { localProp("privateKey").ifEmpty { null } }
.orElse(providers.environmentVariable("PRIVATE_KEY"))
password = providers.provider { localProp("privateKeyPassword").ifEmpty { null } }
.orElse(providers.environmentVariable("PRIVATE_KEY_PASSWORD"))
}
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "21"
targetCompatibility = "21"
}
// Bake the plugin version into a resource so runtime code reads it without
// depending on internal IntelliJ Platform plugin-lookup APIs.
processResources {
val pluginVersion = project.version.toString()
inputs.property("pluginVersion", pluginVersion)
filesMatching("speqa-plugin.properties") {
expand(mapOf("version" to pluginVersion))
}
// The test-case-writer skill lives as a real project skill under
// .claude/skills, and is bundled into the jar as a template so the
// new-project wizard (SpeqaProjectScaffold.installSkill) can install it
// into freshly scaffolded user projects.
from(".claude/skills/speqa-test-cases/SKILL.md") {
into("templates")
rename { "speqa-test-cases-skill.md" }
}
// The bundled starter (web-login example) is kept as a ".tc.md.template" so
// SpeQA does not index it in this repo; it is bundled into the jar as a real
// ".tc.md" that the wizard and the SpeqaProjectScaffoldTest guard read as
// templates/test-cases/login-happy-path.tc.md.
from("templates/test-cases/login-happy-path.tc.md.template") {
into("templates/test-cases")
}
}
// The sandbox IDE defaults to -Xmx2048m, which is not enough to index a large
// project opened in the sandbox (heap exhaustion during indexing). Double it.
runIde {
maxHeapSize = "4g"
}
// buildSearchableOptions launches a headless IDE that also defaults to -Xmx2048m;
// on a memory-pressured machine that OOMs. Give it the same 4g as runIde.
buildSearchableOptions {
maxHeapSize = "4g"
}
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
}
}