-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
87 lines (77 loc) · 2.46 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
87 lines (77 loc) · 2.46 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
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
plugins {
id("java")
id("org.jetbrains.intellij.platform") version "2.2.1"
}
group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven("https://www.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
maven("https://maven.aliyun.com/nexus/content/groups/public/")
maven("https://maven.aliyun.com/nexus/content/repositories/central/")
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity(providers.gradleProperty("platformVersion").get())
bundledPlugin("com.intellij.java")
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
testFramework(TestFrameworkType.JUnit5)
}
// SQLite JDBC 驱动(排除自带 slf4j,使用 IntelliJ Platform 内置版本)
implementation("org.xerial:sqlite-jdbc:3.45.1.0") {
exclude(group = "org.slf4j", module = "slf4j-api")
}
// Gson JSON 处理(extConfig 序列化/反序列化、模板导入导出)
implementation("com.google.code.gson:gson:2.10.1")
}
intellijPlatform {
pluginConfiguration {
id = providers.gradleProperty("pluginId").get()
name = providers.gradleProperty("pluginName").get()
version = providers.gradleProperty("pluginVersion").get()
ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild").get()
untilBuild = providers.gradleProperty("pluginUntilBuild").get()
}
vendor {
name = "wp2code"
url = "https://github.com/wp2code/idea-plugin"
}
}
pluginVerification {
ides {
recommended()
}
}
publishing {
token = System.getenv("PUBLISH_TOKEN")
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
}
runIde {
// 增大沙盒 IDEA 的 JVM 堆内存,避免 debug 时 OOM
jvmArgs("-Xms512m", "-Xmx2048m", "-XX:+UseG1GC", "-XX:ReservedCodeCacheSize=512m")
}
}