aboutsummaryrefslogtreecommitdiffstats
path: root/integration/intellij/build.gradle
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2021-11-18 23:04:30 +0100
committerJon Bratseth <bratseth@gmail.com>2021-11-18 23:04:30 +0100
commitc978c9e29652b24b7f31ed545c1c0e48a17464ec (patch)
treec347e96d74bcb9d180346d90385a2dceb6fbcad5 /integration/intellij/build.gradle
parent28b80bf7669ff14f1af913ef7bcee8659ac555a2 (diff)
Move and rename
Diffstat (limited to 'integration/intellij/build.gradle')
-rw-r--r--integration/intellij/build.gradle72
1 files changed, 72 insertions, 0 deletions
diff --git a/integration/intellij/build.gradle b/integration/intellij/build.gradle
new file mode 100644
index 00000000000..5a4200d0062
--- /dev/null
+++ b/integration/intellij/build.gradle
@@ -0,0 +1,72 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+plugins {
+ id 'org.jetbrains.intellij' version '1.1.4'
+ id 'java'
+
+ id "org.jetbrains.grammarkit" version '2021.1.3'
+
+ id 'maven-publish' // to deploy the plugin into a Maven repo
+}
+
+defaultTasks 'buildPlugin'
+
+apply plugin: 'org.jetbrains.grammarkit'
+
+import org.jetbrains.grammarkit.tasks.GenerateLexer
+import org.jetbrains.grammarkit.tasks.GenerateParser
+
+task generateSdLexer(type: GenerateLexer) {
+ source 'src/main/jflex/ai/vespa/intellij/schema/lexer/sd.flex'
+ targetDir 'target/generated-sources/jflex/ai/vespa/intellij/schema/lexer/'
+ targetClass 'SdLexer'
+ purgeOldFiles true
+}
+
+task generateSdParser(type: GenerateParser) {
+ source 'src/main/bnf/ai/vespa/intellij/schema/parser/sd.bnf'
+ targetRoot 'target/generated-sources/bnf/'
+ pathToParser 'ai/vespa/intellij/schema/parser/SdParser.java'
+ pathToPsiRoot 'ai/vespa/intellij/schema/parser/psi/'
+ purgeOldFiles true
+}
+
+compileJava {
+ dependsOn generateSdLexer
+ dependsOn generateSdParser
+}
+
+group 'ai.vespa'
+version '1.0.3'
+
+sourceCompatibility = 11
+
+// This "noinspection" comment below is here to fix a warning
+// noinspection GroovyAssignabilityCheck
+repositories {
+ mavenCentral()
+}
+
+sourceSets.main.java.srcDirs = ['src/main/java', 'target/generated-sources/bnf', 'target/generated-sources/jflex']
+
+// See https://github.com/JetBrains/gradle-intellij-plugin/
+intellij {
+ version = '2021.2'
+ plugins = ['com.intellij.java']
+}
+
+buildSearchableOptions {
+ enabled = false
+}
+
+patchPluginXml {
+ version = project.version
+ sinceBuild = '203'
+ untilBuild = '212.*'
+ // in changeNotes you can add a description of the changes in this version (would appear in the plugin page in preferences\plugins)
+ changeNotes = """
+ <em></em>"""
+}
+
+test {
+ useJUnitPlatform()
+} \ No newline at end of file