-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
120 lines (103 loc) · 3.45 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
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
112
113
114
115
116
117
118
119
120
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
plugins {
kotlin("jvm") version "2.0.20"
id("org.jetbrains.intellij.platform") version "2.1.0"
id("org.jetbrains.kotlinx.kover") version "0.9.0-RC"
}
kotlin {
jvmToolchain(17)
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
val uiTest by sourceSets.registering {
kotlin.srcDirs("src/uiTest/kotlin")
resources.srcDir("src/uiTest/resources")
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
}
val uiTestImplementation by configurations.getting {
extendsFrom(configurations.testImplementation.get())
}
val uiTestRuntimeOnly by configurations.getting {
extendsFrom(configurations.testRuntimeOnly.get())
}
kover {
merge {
projects(":")
sources {
excludedSourceSets.add("uiTest")
}
}
}
val uiTests by intellijPlatformTesting.testIdeUi.registering {
this.type = IntelliJPlatformType.IntellijIdeaCommunity
version.set("2024.2.3")
task {
enabled = gradle.startParameter.taskNames.any { it.contains("uiTests") }
archiveFile.set(tasks.buildPlugin.flatMap { it.archiveFile })
testClassesDirs = uiTest.get().output.classesDirs
classpath = uiTest.get().compileClasspath + uiTest.get().runtimeClasspath
systemProperty("ataman.configFolder", layout.projectDirectory.dir("example-config").asFile.absolutePath)
environment("ATAMAN_PLUGIN_PATH", tasks.buildPlugin.flatMap { it.archiveFile }.get().asFile.absolutePath)
}
}
tasks.withType<Test>().configureEach {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
group = "io.github.mishkun"
version = "1.3.0"
intellijPlatform {
instrumentCode.set(false)
pluginConfiguration {
changeNotes = """
Add support for special characters with shift (Fix #9)
Add option to perform multiple actions in one binding (Fix #11)
Add repeat latest command action (Fix #2)
Add option to create IDE-specific bindings (Fix #4)
Use monospace font for key labels to make them aligned (Fix #15)
""".trimIndent()
version = project.version.toString()
ideaVersion {
sinceBuild = "231"
untilBuild = "243.*"
}
}
pluginVerification {
ides {
select {
types.set(listOf(IntelliJPlatformType.IntellijIdeaCommunity))
channels.set(listOf(ProductRelease.Channel.RELEASE))
sinceBuild = "231"
untilBuild = "243.*"
}
}
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity("2024.2.3")
testFramework(TestFrameworkType.Platform)
testFramework(TestFrameworkType.Starter, configurationName = "uiTestImplementation")
pluginVerifier()
}
implementation("com.typesafe:config:1.4.2")
testImplementation("junit:junit:4.13.2")
testImplementation("org.hamcrest:hamcrest:3.0")
testImplementation("org.opentest4j:opentest4j:1.2.0")
testImplementation("io.mockk:mockk:1.12.7") {
exclude(group = "org.jetbrains.kotlin")
}
}