forked from dave-tucker/intellij-yang
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
68 lines (58 loc) · 1.57 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
plugins {
idea
java
id("org.jetbrains.kotlin.jvm") version "1.8.22"
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.grammarkit") version "2022.3.2.2"
}
val intellijVersion = prop("intellijVersion")
val intelliLangPlugin = "org.intellij.intelliLang"
val psiViewerPluginVersion = prop("psiViewerPluginVersion")
val psiViewerPlugin = "PsiViewer:${prop("psiViewerPluginVersion")}"
repositories {
mavenCentral()
}
allprojects {
intellij { // See https://github.com/JetBrains/gradle-intellij-plugin/
version.set(intellijVersion)
// not found? apply(plugin = "copyright")
apply(plugin = "java")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
compileKotlin.kotlinOptions.freeCompilerArgs += "-Xjvm-default=enable"
compileKotlin.kotlinOptions.jvmTarget = "17"
allprojects {
sourceSets {
main {
java.srcDirs("src")
resources.srcDirs("resources")
}
}
idea {
module {
generatedSourceDirs.add(file("src/sr/clau/yang/gen"))
}
}
intellij {
plugins.set(
listOf(
intelliLangPlugin,
//psiViewerPlugin
)
)
}
tasks {
runIde {
jvmArgs("-Xmx2000m")
}
}
}
//}
fun prop(name: String): String =
extra.properties[name] as? String
?: error("Property `$name` is not defined in gradle.properties")