-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
111 lines (91 loc) · 2.79 KB
/
build.gradle.kts
File metadata and controls
111 lines (91 loc) · 2.79 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import org.jetbrains.changelog.Changelog
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.9.25"
id("org.jetbrains.intellij.platform") version "2.11.0"
id("org.jetbrains.changelog") version "2.1.2"
}
group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testRuntimeOnly("junit:junit:4.13.2")
intellijPlatform {
create(properties("platformType"), properties("platformVersion"))
bundledPlugins(properties("platformBundledPlugins").map {
it.split(',').map(String::trim).filter(String::isNotEmpty)
})
plugins(properties("platformPlugins").map {
it.split(',').map(String::trim).filter(String::isNotEmpty)
})
testFramework(TestFrameworkType.JUnit5)
}
}
changelog {
groups.empty()
repositoryUrl = properties("pluginRepositoryUrl")
}
intellijPlatform {
buildSearchableOptions = false
pluginConfiguration {
name = properties("pluginName")
version = properties("pluginVersion")
ideaVersion {
sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild").map { it.ifEmpty { null } }
}
val changelog = project.changelog
changeNotes = properties("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
.withHeader(false)
.withEmptySections(false),
Changelog.OutputType.HTML,
)
}
}
}
signing {
certificateChain = environment("CERTIFICATE_CHAIN")
privateKey = environment("PRIVATE_KEY")
password = environment("PRIVATE_KEY_PASSWORD")
}
publishing {
token = environment("PUBLISH_TOKEN")
}
}
tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
}
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
test {
useJUnitPlatform()
jvmArgs("-Duser.timezone=UTC")
}
runIde {
jvmArgs("-Dkotlinx.coroutines.debug=off")
}
}