forked from SeeSharpSoft/intellij-csv-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (111 loc) · 3.17 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
buildscript {
repositories {
mavenCentral()
maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.github.hurricup:gradle-grammar-kit-plugin:2018.1.1'
}
}
plugins {
// https://github.com/JetBrains/gradle-intellij-plugin
id 'org.jetbrains.intellij' version '0.4.10'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.2'
id "com.github.ManifestClasspath" version "0.1.0-RELEASE"
}
jacocoTestReport {
reports {
xml.enabled true
}
}
group 'net.seesharpsoft.intellij.plugins'
version '2.8.2'
apply plugin: 'java'
sourceCompatibility = javaVersion
targetCompatibility = javaTargetVersion
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.apache.ant:ant:1.7.0'
testCompile 'org.mockito:mockito-core:2.28.2'
}
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
languageLevel = javaVersion
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-2019.1.3')
pluginName = 'CSV Plugin'
instrumentCode = true
updateSinceUntilBuild = false
downloadSources = true
}
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.1.1')
}
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
}