-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.gradle.kts
98 lines (81 loc) · 2.24 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
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
fun getVersionDetails(): com.palantir.gradle.gitversion.VersionDetails =
(extra["versionDetails"] as groovy.lang.Closure<*>)() as com.palantir.gradle.gitversion.VersionDetails
val gitInfo = getVersionDetails()
var releaseChannels = arrayOf<String>()
when {
properties.containsKey("snapshotVersion") -> {
version = properties["snapshotVersion"]!!
releaseChannels = arrayOf("snapshot")
}
gitInfo.isCleanTag -> {
version = gitInfo.lastTag
releaseChannels = arrayOf("default")
}
else -> {
version = gitInfo.version
releaseChannels = arrayOf("local")
}
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
plugins {
id("java")
kotlin("jvm") version "2.1.0"
id("org.jetbrains.intellij.platform") version "2.2.1"
id("com.palantir.git-version") version "3.0.0"
id("com.adarshr.test-logger") version "4.0.0"
}
dependencies {
implementation(kotlin("reflect"))
testImplementation("junit", "junit", "4.13.2")
intellijPlatform {
intellijIdeaUltimate(providers.gradleProperty("idea-version"))
pluginVerifier()
zipSigner()
instrumentationTools()
bundledPlugins(
listOf(
"com.intellij.css",
"HtmlTools",
"JavaScript",
)
)
testFramework(TestFrameworkType.Platform)
}
}
// See https://github.com/JetBrains/gradle-intellij-plugin/
intellijPlatform {
pluginConfiguration {
name = "MJML Support"
ideaVersion {
untilBuild = provider { null }
}
}
pluginVerification {
ides {
recommended()
}
}
publishing {
token = System.getenv("JB_TOKEN")
channels = releaseChannels.toList()
}
}
kotlin {
jvmToolchain(17)
}
tasks {
test {
testLogging {
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
}
useJUnit()
// Prevent "File access outside allowed roots" in multi-module tests, because modules each have an .iml
environment("NO_FS_ROOTS_ACCESS_CHECK", "1")
}
}