forked from btbrq/simple-editor-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
65 lines (53 loc) · 1.71 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
60
61
62
63
64
65
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
plugins {
id("java")
id("groovy")
id("org.jetbrains.kotlin.jvm") version "1.7.21"
id("org.jetbrains.intellij") version "1.10.1"
}
group = "com.github.btbrq.simpleeditorplugin"
version = "1.0.0"
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(11)
}
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
updateSinceUntilBuild.set(false)
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("org.codehaus.groovy:groovy-all:2.5.14")
testImplementation("org.spockframework:spock-core:1.2-groovy-2.5")
}
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = "1.8"
}
tasks {
patchPluginXml {
if (System.getenv("CHANGE_NOTES_PATH") != null) {
changeNotes.set(file(System.getenv("CHANGE_NOTES_PATH")).readText())
}
}
signPlugin {
if (System.getenv("CERTIFICATE_CHAIN_PATH") != null && System.getenv("PRIVATE_KEY_PATH") != null) {
certificateChain.set(file(System.getenv("CERTIFICATE_CHAIN_PATH")).readText())
privateKey.set(file(System.getenv("PRIVATE_KEY_PATH")).readText())
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
}
publishPlugin {
token.set(System.getenv("ORG_GRADLE_PROJECT_intellijPublishToken"))
}
}