-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
84 lines (69 loc) · 1.9 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
import org.jetbrains.grammarkit.tasks.GenerateLexerTask
import org.jetbrains.grammarkit.tasks.GenerateParserTask
plugins {
id("java")
id("org.jetbrains.intellij") version "1.13.2"
id("org.jetbrains.grammarkit") version "2022.3.1"
}
group = "com.github.lppedd"
version = "0.2.1"
repositories {
mavenCentral()
}
sourceSets {
main {
java {
srcDir("src/main/gen")
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
intellij {
pluginName.set("idea-pomsky")
version.set("LATEST-EAP-SNAPSHOT")
type.set("IC")
plugins.set(listOf("java" /* Only for code documentation */))
}
grammarKit {
jflexRelease.set("1.7.0-1")
grammarKitRelease.set("2022.3.1")
}
dependencies {
implementation("one.util:streamex:0.8.1")
}
tasks {
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
val generateLexer = task<GenerateLexerTask>("generatePomskyLexer") {
sourceFile.set(file("src/main/java/com/github/lppedd/idea/pomsky/lang/lexer/pomsky.flex"))
targetDir.set("src/main/gen/com/github/lppedd/idea/pomsky/lang/lexer")
targetClass.set("PomskyFlexLexer")
purgeOldFiles.set(true)
}
val generateParser = task<GenerateParserTask>("generatePomskyParser") {
dependsOn(generateLexer)
sourceFile.set(file("src/main/java/com/github/lppedd/idea/pomsky/lang/parser/pomsky.bnf"))
targetRoot.set("src/main/gen")
pathToParser.set("com/github/lppedd/idea/pomsky/lang/parser/PomskyGeneratedParser.java")
pathToPsiRoot.set("psi")
purgeOldFiles.set(true)
}
compileJava {
dependsOn(generateParser)
}
patchPluginXml {
version.set(project.version.toString())
sinceBuild.set("231")
untilBuild.set("233.*")
pluginDescription.set((File("${projectDir.path}/plugin-description.html").readText(Charsets.UTF_8)))
}
runPluginVerifier {
ideVersions.set(listOf(
"IC-2023.1",
))
}
}