summaryrefslogtreecommitdiffstats
path: root/sd-plugin/build.gradle
blob: 90a137ce4738e0badbed7096dfd279846862df59 (plain) (blame)
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
// This "noinspection" comment below is here to fix a warning
//noinspection GroovyAssignabilityCheck
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
}

apply plugin: 'org.jetbrains.grammarkit'

import org.jetbrains.grammarkit.tasks.GenerateLexer
import org.jetbrains.grammarkit.tasks.GenerateParser

task generateSdLexer(type: GenerateLexer) {
  source 'src/main/java/org/intellij/sdk/language/lexer/sd.flex'
  targetDir 'src/main/gen/org/intellij/sdk/language/lexer/'
  targetClass 'SdLexer'
  purgeOldFiles true
}

task generateSdParser(type: GenerateParser) {
  source 'src/main/java/org/intellij/sdk/language/parser/sd.bnf'
  targetRoot 'src/main/gen'
  pathToParser 'org/intellij/sdk/language/parser/SdParser.java'
  pathToPsiRoot 'org/intellij/sdk/language/psi/'
  purgeOldFiles true
}

compileJava {
  dependsOn generateSdLexer
  dependsOn generateSdParser
}


group 'org.yahoo.native'
version '1.0.0'

sourceCompatibility = 11

// This "noinspection" comment below is here to fix a warning
//noinspection GroovyAssignabilityCheck
repositories {
  mavenCentral()
}


sourceSets.main.java.srcDirs 'src/main/gen'

// 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()
}