-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
79 lines (64 loc) · 1.6 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
71
72
73
74
75
76
77
78
79
import org.jetbrains.changelog.closure
fun properties(key: String) = project.findProperty(key).toString()
plugins {
java
id("com.diffplug.spotless") version "5.12.4"
id("org.jetbrains.changelog") version "1.1.2"
id("org.jetbrains.intellij") version "1.3.1"
}
repositories {
mavenCentral()
}
project.group = properties("pluginGroup")
project.version = properties("pluginVersion")
intellij {
pluginName = "Hacker News"
version = properties("platformVersion")
type = properties("platformType")
downloadSources = properties("platformDownloadSources").toBoolean()
updateSinceUntilBuild = true
}
changelog {
version = properties("pluginVersion")
groups = emptyList()
}
tasks {
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"
}
patchPluginXml {
version(properties("pluginVersion"))
sinceBuild(properties("pluginSinceBuild"))
untilBuild(properties("pluginUntilBuild"))
changeNotes(
closure {
changelog.getLatest().toHTML()
}
)
}
runPluginVerifier {
ideVersions(properties("pluginVerifierIdeVersions"))
}
publishPlugin {
dependsOn("patchChangelog")
token(System.getenv("JETBRAINS_PUBLISH_TOKEN"))
channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())
}
}
spotless {
kotlinGradle {
ktlint().userData(mapOf(
"indent_size" to "2",
"continuation_indent_size" to "2"
))
endWithNewline()
}
java {
googleJavaFormat()
}
}
tasks.withType<Wrapper> {
gradleVersion = "6.8.3"
distributionType = Wrapper.DistributionType.ALL
}