/
build.gradle
136 lines (122 loc) · 3.53 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
buildscript {
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.github.hurricup:gradle-grammar-kit-plugin:2021.1.3'
}
}
plugins {
// https://github.com/JetBrains/gradle-intellij-plugin
id 'org.jetbrains.intellij' version '1.2.0'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.4'
id "com.github.ManifestClasspath" version "0.1.0-RELEASE"
}
jacoco {
toolVersion = "0.8.6"
}
jacocoTestReport {
reports {
xml.enabled true
}
}
group 'net.seesharpsoft.intellij.plugins'
version '2.18.2'
apply plugin: 'java'
project.sourceCompatibility = JavaVersion.VERSION_11
project.targetCompatibility = JavaVersion.VERSION_11
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:deprecation"
}
repositories {
mavenCentral()
}
dependencies {
implementation 'net.seesharpsoft.sharping:sharping-commons:0.21.0'
compileOnly 'org.apache.ant:ant:1.10.9'
testCompile 'org.mockito:mockito-core:3.8.0'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'gen']
}
resources {
srcDirs = ['src/main/resources']
}
}
test {
java {
srcDirs = ['src/test/java']
}
resources {
srcDirs = ['src/test/resources']
}
}
}
apply plugin: 'idea'
idea {
project {
jdkName = JavaVersion.VERSION_11
languageLevel = JavaVersion.VERSION_11
vcs = 'Git'
}
module {
generatedSourceDirs += file('gen')
}
}
apply plugin: 'org.jetbrains.intellij'
intellij {
// IDE version - https://www.jetbrains.com/intellij-repository/releases
version = System.getenv().getOrDefault('IDEA_VERSION', 'IC-2020.1.1')
pluginName = 'CSV'
updateSinceUntilBuild = false
downloadSources = Boolean.parseBoolean(System.getenv().getOrDefault('IDEA_SOURCES', "true"))
}
patchPluginXml {
changeNotes = """<pre style="font-family: sans-serif">
FIX: java.lang.NullPointerException #320
FIX: Exception when Show info balloon is not selected #318
</pre>"""
}
publishPlugin {
token = System.getenv().getOrDefault('JI_TOKEN', '')
channels = [System.getenv().getOrDefault('JI_CHANNELS', 'Testing')]
}
test {
jacoco {
enabled = true
}
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
}
apply plugin: 'org.jetbrains.grammarkit'
grammarKit {
// version of IntelliJ patched JFlex - https://bintray.com/jetbrains/intellij-third-party-dependencies/jflex
jflexRelease = '1.7.0-1'
// tag or short commit hash of Grammar-Kit to use - https://github.com/JetBrains/Grammar-Kit
grammarKitRelease = System.getenv().getOrDefault('GRAMMAR_KIT_VERSION', '2019.3')
}
import org.jetbrains.grammarkit.tasks.GenerateLexer
import org.jetbrains.grammarkit.tasks.GenerateParser
task generateCsvParser(type: GenerateParser) {
source = 'src/main/java/net/seesharpsoft/intellij/plugins/csv/Csv.bnf'
targetRoot = 'gen'
pathToParser = '/net/seesharpsoft/intellij/plugins/csv/parser/CsvParser.java'
pathToPsiRoot = '/net/seesharpsoft/intellij/plugins/csv/psi'
purgeOldFiles = true
}
task generateCsvLexer(dependsOn: generateCsvParser, type: GenerateLexer) {
source = 'src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvLexer.flex'
targetDir = './gen/net/seesharpsoft/intellij/plugins/csv/'
targetClass = 'CsvLexer'
purgeOldFiles = true
}
compileJava {
dependsOn generateCsvLexer
}