-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
142 lines (116 loc) · 4.63 KB
/
build.gradle.kts
File metadata and controls
142 lines (116 loc) · 4.63 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
135
136
137
138
139
140
141
142
// Copyright (C) 2016-2025 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0
import io.github.rhdunn.intellij.IntelliJSnapshot
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import java.net.URI
plugins {
id("org.jetbrains.intellij.platform") version Version.Plugin.IntelliJPlatform
id("org.jetbrains.kotlin.jvm") version Version.Kotlin(BuildConfiguration.IntelliJ)
}
val ijVersion = BuildConfiguration.IntelliJ
allprojects {
apply(plugin = "org.jetbrains.intellij.platform")
apply(plugin = "org.jetbrains.kotlin.jvm")
group = ProjectMetadata.Build.GroupId
version = ProjectMetadata.Build.Version(ijVersion)
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
jetbrainsRuntime()
}
maven { url = URI("https://packages.jetbrains.team/maven/p/grazi/grazie-platform-public") } // grazie
maven { url = URI("https://download.jetbrains.com/teamcity-repository") } // teamcity
maven { url = URI("https://packages.jetbrains.team/maven/p/dpgpv/maven") } // download-pgp-verifier
}
kotlin {
jvmToolchain(Version.Java(ijVersion))
}
tasks.runIde {
maxHeapSize = "2g"
}
dependencies {
intellijPlatform {
if (ijVersion is IntelliJSnapshot) {
create(ijVersion.platformType, ijVersion.value) {
useInstaller = false
}
jetbrainsRuntime()
} else {
create(ijVersion.platformType, ijVersion.platformVersion) {
useInstaller = true
}
}
testFramework(TestFrameworkType.Platform)
}
testImplementation("org.junit.jupiter:junit-jupiter-api:${Version.Dependency.JUnit5}")
testImplementation("org.hamcrest:hamcrest-core:${Version.Dependency.Hamcrest}")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:${Version.Dependency.JUnitPlatform}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${Version.Dependency.JUnit5}")
testRuntimeOnly("junit:junit:${Version.Dependency.JUnit4}")
}
tasks.test {
useJUnitPlatform()
// IntelliJ requires the tests to be run headless when loading icons, etc.
systemProperty("java.awt.headless", "true")
}
}
dependencies {
intellijPlatform {
bundledPlugin("com.intellij.java")
bundledPlugin("com.intellij.properties")
if (ijVersion.buildVersion >= 253) {
bundledModule("intellij.platform.langInjection")
} else {
bundledPlugin("org.intellij.intelliLang")
}
if (ijVersion.buildVersion >= 243) {
bundledPlugin("com.intellij.modules.json")
}
}
implementation(project(":src:kotlin-intellij"))
implementation(project(":src:lang-core"))
implementation(project(":src:plugin-api"))
implementation(project(":src:plugin-basex"))
implementation(project(":src:plugin-existdb"))
implementation(project(":src:plugin-marklogic"))
implementation(project(":src:plugin-saxon"))
implementation(project(":src:plugin-xijp"))
implementation(project(":src:lang-xdm"))
implementation(project(":src:lang-xpm"))
implementation(project(":src:lang-xpath"))
implementation(project(":src:lang-xquery"))
implementation(project(":src:lang-xslt"))
implementation(project(":src:lang-xproc"))
implementation(project(":src:lang-java"))
implementation(project(":src:lang-xqdoc"))
implementation(project(":src:plugin-expath"))
implementation(project(":src:plugin-exquery"))
implementation(project(":src:plugin-w3"))
testImplementation(project(":src:intellij-test"))
testImplementation("org.hamcrest:hamcrest-core:${Version.Dependency.Hamcrest}")
}
sourceSets.main {
if (ijVersion.buildVersion >= 251 || ijVersion.platformType == "IU") {
resources.srcDir("src/main/resources-microservices/native")
} else {
resources.srcDir("src/main/resources-microservices/compat")
}
}
println("Building for IntelliJ ${ijVersion.platformType} version '${ijVersion.platformVersion}', since build '${ijVersion.buildVersion}'")
intellijPlatform {
pluginConfiguration {
ideaVersion {
sinceBuild = "${ijVersion.buildVersion}"
untilBuild = "${ijVersion.buildVersion}.*"
}
}
pluginVerification {
ides {
recommended()
}
freeArgs = listOf(
// The plugin was previously uploaded to the JetBrains Marketplace, so `intellij` in the plugin ID is permitted.
"-mute", "TemplateWordInPluginId",
)
}
}