forked from JetBrains/js-graphql-intellij-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
122 lines (104 loc) · 3.76 KB
/
build.gradle
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
plugins {
id 'org.jetbrains.grammarkit' version '2021.2.1'
id 'org.jetbrains.intellij' version '1.3.1'
id 'com.github.ManifestClasspath' version '0.1.0-RELEASE'
id 'org.jetbrains.changelog' version '1.3.1'
}
group pluginGroup
version pluginVersion
apply plugin: 'org.jetbrains.grammarkit'
apply plugin: 'java'
apply plugin: 'org.jetbrains.changelog'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
}
dependencies {
implementation 'commons-io:commons-io:2.6'
implementation 'com.atlassian.commonmark:commonmark:0.12.1'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.21'
implementation 'fr.opensagres.js:minimatch.java:1.1.0'
implementation 'io.github.cdimascio:dotenv-kotlin:6.2.2'
implementation 'io.sentry:sentry:5.4.3'
implementation 'com.graphql-java:java-dataloader:2.2.3'
implementation 'org.reactivestreams:reactive-streams:1.0.2'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
intellij {
version = platformVersion
type = platformType
plugins = ['JavaScriptLanguage', 'CSS', 'IntelliLang', 'java']
ideaDependencyCachePath = project.buildDir.absolutePath
patchPluginXml {
version = pluginVersion
sinceBuild = pluginSinceBuild
untilBuild = pluginUntilBuild
changeNotes = """
<h2>New in $pluginVersion</h2>
${changelog.get(pluginVersion.toString()).toHTML()}
<br />
See the <a href="https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/blob/master/CHANGELOG.md">CHANGELOG</a> for more details and history.
""".stripIndent()
}
}
runPluginVerifier {
ideVersions = ['IU-2020.3.1', 'IU-2021.1', 'IU-2021.2', 'IU-2021.3', 'IU-2022.1']
}
runIde {
jvmArgs '-Xmx2G'
}
sourceSets {
main.java.srcDirs = ['src/main', 'gen']
main.resources.srcDir 'resources'
test.java.srcDirs = ['src/test']
test.resources.srcDir 'test-resources'
}
//// import is optional to make task creation easier
//
//import org.jetbrains.grammarkit.tasks.GenerateLexer
//import org.jetbrains.grammarkit.tasks.GenerateParser
//
//// GraphQL parser should be generated manually when needed
//// because of some limitations of the gradle-grammar-kit-plugin
//
//// GraphQL Endpoint Parser and Lexer
//task generateGraphQLEndpointLexer(type: GenerateLexer) {
// source 'src/grammars/JSGraphQLEndpointLexer.flex'
// targetDir 'gen/com/intellij/lang/jsgraphql/endpoint/lexer/'
// targetClass 'JSGraphQLEndpointLexer'
// purgeOldFiles = true
//}
//
//task generateGraphQLEndpointParser(type: GenerateParser) {
// source 'src/grammars/JSGraphQLEndpointParser.bnf'
// targetRoot = 'gen/'
// purgeOldFiles = true
// pathToParser = 'com/intellij/lang/jsgraphql/endpoint/parser/JSGraphQLEndpointParser'
// pathToPsiRoot = 'com/intellij/lang/jsgraphql/endpoint/psi'
//}
//
//
//// GraphQL Endpoint Doc Parser and Lexer
//task generateGraphQLEndpointDocLexer(type: GenerateLexer) {
// source 'src/grammars/JSGraphQLEndpointDocLexer.flex'
// targetDir 'gen/com/intellij/lang/jsgraphql/endpoint/doc/lexer/'
// targetClass 'JSGraphQLEndpointDocLexer'
// purgeOldFiles = true
//}
//
//task generateGraphQLEndpointDocParser(type: GenerateParser) {
// source 'src/grammars/JSGraphQLEndpointDocParser.bnf'
// targetRoot = 'gen/'
// purgeOldFiles = true
// pathToParser = 'com/intellij/lang/jsgraphql/endpoint/doc/JSGraphQLEndpointDocParser'
// pathToPsiRoot = 'com/intellij/lang/jsgraphql/endpoint/doc/psi'
//}
//
//compileJava {
// dependsOn generateGraphQLEndpointLexer
// dependsOn generateGraphQLEndpointParser
// dependsOn generateGraphQLEndpointDocLexer
// dependsOn generateGraphQLEndpointDocParser
//}
compileJava.options.encoding = 'UTF-8'