-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
70 lines (58 loc) · 1.26 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
66
67
68
69
70
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
java
kotlin("jvm") version "1.7.22"
id("org.jetbrains.intellij") version "1.10.1"
}
fun getEnv(envName: String) = System.getenv(envName)?.replace(Regex("\n+"), "")
group = "io.ayfri"
version = "0.5.1"
repositories {
google()
mavenCentral()
}
intellij {
version.set("2022.3")
type.set("IC")
plugins.set(
listOf(
"java",
"com.intellij.gradle",
"com.intellij.properties",
"org.jetbrains.kotlin",
)
)
}
tasks {
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
// Delete build/tmp to update plugin in Intellij sandbox
delete {
delete(file("build/tmp"))
}
}
patchPluginXml {
version.set(project.version.toString())
changeNotes.set("""
<![CDATA[
${file("CHANGELOG.html").readText()}
]]>
""".trimIndent())
sinceBuild.set("223")
untilBuild.set("223.*")
}
signPlugin {
val certificate = File("keys/chain.crt").readText(Charsets.UTF_8)
certificateChain.set(certificate)
val key = File("keys/private.pem").readText(Charsets.UTF_8)
privateKey.set(key)
password.set(getEnv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(getEnv("PUBLISH_TOKEN"))
}
}