forked from BashSupport/BashSupport
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
141 lines (121 loc) · 3.62 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
137
138
139
140
141
buildscript {
dependencies {
// this is the version included in the earlies SDK we're supporting
// this is IJ 145.x, which includes Kotlin 1.0.3
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.7"
classpath "com.github.jengelman.gradle.plugins:shadow:2.0.1"
}
}
plugins {
id "org.jetbrains.intellij" version "0.4.8"
}
apply plugin: 'com.github.johnrengelman.shadow'
group = 'com.ansorgit.plugins.bash.call.Bash'
shadowJar {
zip64 true
manifest {
attributes 'Main-Class': "com.ansorgit.plugins.bash.call.BashNode"
}
}
repositories {
//maven { url 'http://dl.bintray.com/jetbrains/intellij-plugin-service' }
jcenter()
mavenCentral()
}
version = "${new File('pluginVersion.txt').getText('UTF-8')}"
allprojects {
apply plugin: 'java'
apply plugin: 'kotlin'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
plugins.withType(JavaPlugin) {
test {
systemProperty "NO_FS_ROOTS_ACCESS_CHECK", "true"
}
}
compileKotlin {
kotlinOptions {
apiVersion = 1.0
languageVersion = 1.0
noStdlib = true
noReflect = true
}
}
sourceSets {
main {
java.srcDirs 'src'
resources.srcDir 'resources'
}
test {
java.srcDir "test"
if (ideaBranch != null && ideaBranch != "" && ideaBranch.toInteger() >= 183) {
java.srcDirs += "test-183"
}
resources.srcDir 'testResources'
}
}
apply plugin: 'org.jetbrains.intellij'
intellij {
version ideaVersion
type "IC"
pluginName 'BashSupport'
plugins 'IntelliLang', 'terminal'
downloadSources Boolean.valueOf(sources)
patchPluginXml {
sinceBuild '145.0'
untilBuild '191.*'
}
}
publishPlugin {
username 'wallaby'
password System.properties['intellij.publish.password']
channels pluginChannels
}
apply plugin: 'jacoco'
jacoco {
toolVersion = "0.7.9"
reportsDir = file("$buildDir/reports/coverage")
}
test {
finalizedBy jacocoTestReport
jacoco {
enabled true
append false
includes ["com.ansorgit.*"]
}
}
ant.importBuild("build.xml")
task doJFlex(dependsOn: JavaPlugin.PROCESS_RESOURCES_TASK_NAME) {
doLast {
jflex
}
}
compileJava.dependsOn(doJFlex)
// test logging configuration, shows test progress and messages to standard error
// see https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/testing/logging/TestLogEvent.html
test {
testLogging {
events = [
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR
]
}
}
}
dependencies {
compile fileTree(dir: 'src/com/ansorgit/bash-lib/')
}
task addPsiViewer {
if (ideaBranch != null && ideaBranch != "") {
def slurper = new groovy.json.JsonSlurper()
def psiVersions = slurper.parseText(psiViewerVersions)
def psiVersion = psiVersions[ideaBranch]
if (psiVersion != null) {
intellij.plugins += "PsiViewer:$psiVersion"
}
}
}
prepareSandbox.finalizedBy addPsiViewer