-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
59 lines (47 loc) · 1.52 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
55
56
57
58
59
fun prop(key: String) = project.findProperty(key).toString()
fun groovyClosure(param: (Any, Any) -> String?) = KotlinClosure2(param)
plugins {
id("org.jetbrains.intellij") version "1.17.2"
id("pl.allegro.tech.build.axion-release") version "1.13.6"
}
scmVersion {
tag.initialVersion = groovyClosure { _, _ -> "0.1.4" }
snapshotCreator = groovyClosure { _, _ -> "" }
useHighestVersion = true
}
java.targetCompatibility = JavaVersion.VERSION_11
group = prop("pluginGroup")
version = scmVersion.version
repositories {
mavenCentral()
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
pluginName.set(prop("pluginName"))
version.set(prop("platformVersion"))
type.set(prop("platformType"))
downloadSources.set(prop("platformDownloadSources").toBoolean())
updateSinceUntilBuild.set(true)
}
tasks {
buildSearchableOptions {
enabled = false
}
patchPluginXml {
version.set(scmVersion.version)
sinceBuild.set(prop("pluginSinceBuild"))
untilBuild.set(prop("pluginUntilBuild"))
}
// signPlugin {
// certificateChain.set(System.getenv("JB_CERTIFICATE_CHAIN"))
// privateKey.set(System.getenv("JB_PRIVATE_KEY"))
// password.set(System.getenv("JB_PRIVATE_KEY_PASSWORD"))
// }
publishPlugin {
System.getenv("JB_PLUGINS_CHANNEL")
.let { if (it.isNullOrBlank()) "beta" else it }
.let { channels.set(listOf(it)) }
println("publishing version ${scmVersion.version} :: project set version is $version")
token.set(System.getenv("JB_PLUGINS_PUBLISH_TOKEN"))
}
}