-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathbuild.gradle.kts
54 lines (44 loc) · 1.59 KB
/
build.gradle.kts
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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
fun properties(key: String) = providers.gradleProperty(key)
plugins {
id("org.jetbrains.intellij") version "1.17.4"
}
repositories {
mavenCentral()
}
version = properties("pluginVersion").get().ifEmpty { properties("platformVersion").get() } +
properties("pluginBranch").get().ifEmpty { properties("platformBranch").get() } +
properties("pluginBuild").get().ifEmpty { properties("platformBuild").get() }
apply(plugin = "java")
apply(plugin = "org.jetbrains.intellij")
intellij {
pluginName.set(properties("name").get())
version.set(project.provider {
properties("platformVersion").get() + properties("platformBranch").get() + properties("platformBuild").get()
})
updateSinceUntilBuild.set(true)
}
tasks {
withType<JavaCompile> {
options.encoding = "UTF-8"
sourceCompatibility = properties("javaVersion").get()
targetCompatibility = properties("javaTargetVersion").get()
}
patchPluginXml {
changeNotes.set(provider { file(properties("psiViewerChangesFile").get()).readText() })
pluginDescription.set(properties("psiViewerDescription").get())
}
test {
systemProperty("idea.plugins.path", project.rootDir.canonicalPath + "/.test-plugins")
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
}
}
publishPlugin {
if (project.hasProperty("eap")) {
channels.set(listOf("EAP"))
}
token.set(properties("jbToken").orElse(""))
}
}