forked from acejump/AceJump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
executable file
·57 lines (46 loc) · 1.43 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
import org.jetbrains.intellij.tasks.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.intellij.tasks.PatchPluginXmlTask
plugins {
idea apply true
kotlin("jvm") version "1.3.61"
id("org.jetbrains.intellij") version "0.4.14"
}
fun fetchChangeNotes() = File("CHANGES.md").readLines().drop(4).takeWhile { !it.startsWith("###") }.let { notes ->
"<![CDATA[$notes<a href=\"https://github.com/acejump/AceJump/blob/master/src/main/resources/META-INF/CHANGES.md\">Release Notes</a> ]]>"
}
tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
kotlinOptions.freeCompilerArgs += "-progressive"
}
named<Zip>("buildPlugin") {
dependsOn("test")
archiveFileName.set("AceJump.zip")
}
withType<RunIdeTask> {
dependsOn("test")
findProperty("luginDev")?.let { args = listOf(projectDir.absolutePath) }
}
withType<PublishTask> {
token(project.findProperty("jbr.token") as String?
?: System.getenv("JBR_TOKEN"))
}
withType<PatchPluginXmlTask> {
sinceBuild("183.*")
changeNotes(fetchChangeNotes())
}
}
dependencies {
// gradle-intellij-plugin doesn't attach sources properly for Kotlin :(
compileOnly(kotlin("stdlib-jdk8"))
implementation("net.duguying.pinyin:pinyin:0.0.1")
}
repositories.mavenCentral()
intellij {
pluginName = "AceJump"
updateSinceUntilBuild = false
setPlugins("java")
}
group = "org.acejump"
version = "3.5.9"