-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
105 lines (85 loc) · 2.58 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
buildscript {
repositories {
maven("https://jitpack.io")
}
}
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.9.25"
id("org.jetbrains.intellij.platform") version "2.1.0"
id("com.palantir.git-version") version "3.0.0"
id("org.jetbrains.grammarkit") version "2022.3.2.2"
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
intellijDependencies()
}
}
dependencies {
intellijPlatform {
// We should build against the lower supported version (`sinceBuild`).
// See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#multipleIDEVersions.
intellijIdeaCommunity("2024.3")
plugins(listOf("org.intellij.scala:2024.3.18"))
bundledPlugins(listOf("com.intellij.java"))
instrumentationTools()
}
implementation(kotlin("reflect", version = "1.7.22"))
// explicit dependency to avoid version conflicts
}
kotlin {
jvmToolchain(21)
}
group = "com.github.tomas-milata"
val gitVersion: groovy.lang.Closure<String> by extra
version = gitVersion() // uses git describe
sourceSets {
main {
java.srcDirs("src/main", "src/generated")
resources.srcDir("resources")
}
}
intellijPlatform {
pluginConfiguration {
ideaVersion {
sinceBuild = "243"
// leaving untilBuild unspecified to avoid unnecessary releases
}
changeNotes = """
<h1>2020.2.4</h1>
<ul>
<li>Added code completion and "go to definition" for other routers</li>
<li>Improved controller code completion performance</li>
<li>Added icons next to code completion suggestions</li>
</ul>
""".trimIndent()
}
publishing {
token = System.getenv("INTELLIJ_PUBLISH_TOKEN")
channels = listOf(System.getenv("INTELLIJ_PUBLISH_CHANNEL") ?: "alpha")
}
}
tasks {
generateParser {
sourceFile.set(file("src/main/grammar/Routes.bnf"))
pathToParser.set("/com/github/tomasmilata/intelliroutes/parser/RoutesParser.java")
pathToPsiRoot.set("/com/github/tomasmilata/intelliroutes/psi")
targetRootOutputDir.set(file("src/generated"))
}
generateLexer {
dependsOn(generateParser)
sourceFile.set(file("src/main/jflex/Routes.flex"))
targetOutputDir.set(file("src/generated/com/github/tomasmilata/intelliroutes"))
}
compileKotlin {
dependsOn(generateLexer)
}
}
intellijPlatformTesting {
runIde
testIde
testIdeUi
testIdePerformance
}