forked from redhat-developer/intellij-quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
214 lines (189 loc) · 6.8 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
plugins {
id "org.jetbrains.intellij" version "1.5.2"
id "com.adarshr.test-logger" version "1.7.0"
id 'idea'
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.6.0'
id 'jacoco'
id "de.undercouch.download" version "5.0.2"
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
intellij {
version = ideaVersion //for a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
plugins = ['java', 'maven', 'gradle-java', 'properties', 'yaml', 'com.redhat.devtools.intellij.telemetry:0.0.3.33']
pluginName = 'Quarkus Tools'
updateSinceUntilBuild = false
}
runPluginVerifier {
ideVersions = [ideaVersion]
failureLevel = org.jetbrains.intellij.tasks.RunPluginVerifierTask.FailureLevel.NONE
}
publishPlugin {
token = jetBrainsToken
channels = [jetBrainsChannel]
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://repository.jboss.org/nexus/content/repositories/snapshots'
}
maven {
url 'https://repository.jboss.org/nexus/content/groups/public'
}
maven {
url 'https://repo.eclipse.org/content/repositories/lsp4mp-snapshots'
}
maven {
url 'https://repo.eclipse.org/content/repositories/lsp4mp-releases'
}
maven {
url 'https://packages.jetbrains.team/maven/p/ij/intellij-dependencies'
}
}
configurations {
compile {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
lsp
testRuntime {
setCanBeResolved(true)
}
}
sourceSets {
main {
if (Integer.parseInt(ideaVersion.substring(3).substring(0, 4)) >= 2021) {
java.srcDirs += 'src/main/java-post2021'
} else {
java.srcDirs += 'src/main/java-pre2021'
}
}
test {
java.srcDir 'src/test/java'
java.srcDir 'intellij-community/java/compiler/tests'
java.srcDir 'intellij-community/platform/external-system-impl/testSrc'
java.srcDir 'intellij-community/platform/testFramework/extensions/src'
java.srcDir 'intellij-community/platform/lang-impl/testSources'
java.srcDir 'intellij-community/plugins/maven/src/test/java'
java.srcDir 'intellij-community/plugins/gradle/testSources'
java.srcDir 'intellij-community/plugins/gradle/tooling-extension-impl/testSources'
resources.srcDir file('src/test/resources')
}
integrationTest {
java.srcDir file('src/it/java')
resources.srcDir file('src/it/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
task integrationTest(type: Test) {
useJUnitPlatform()
description = 'Runs the integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
mustRunAfter test
}
tasks.withType(Test) {
environment 'GRADLE_RELEASE_REPOSITORY','https://services.gradle.org/distributions'
systemProperty 'idea.log.leaked.projects.in.tests', 'false'
systemProperty 'idea.maven.test.mirror', 'https://repo1.maven.org/maven2'
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.10'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.10.8'
compile 'org.zeroturnaround:zt-zip:1.14'
compile 'com.kotcrab.remark:remark:1.2.0'
compile 'org.jsoup:jsoup:1.14.2'
compile("io.quarkus:quarkus-core:$quarkusVersion") {
transitive = false
}
compile("io.quarkus:quarkus-core-deployment:$quarkusVersion") {
exclude group: 'org.aesh'
exclude group: 'org.apache.commons'
exclude group: 'org.wildfly.common'
exclude group: 'io.quarkus.gizmo'
exclude group: 'org.ow2.asm'
exclude group: 'io.quarkus'
exclude group: 'org.eclipse.sisu'
exclude group: 'org.graalvm.sdk'
exclude group: 'org.junit.platform'
exclude group: 'org.junit.jupiter'
}
compile("io.quarkus:quarkus-arc:$quarkusVersion") {
transitive = false
}
compile 'org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.5.0'
compile 'org.eclipse.lsp4j:org.eclipse.lsp4j:0.14.0'
//required by lsp4j as the version from IJ is incompatible
compile 'com.google.code.gson:gson:2.8.9'
compile 'com.vladsch.flexmark:flexmark:0.50.50'
testCompile 'com.redhat.devtools.intellij:intellij-common-ui-test-library:0.1.0'
lsp('org.eclipse.lsp4mp:org.eclipse.lsp4mp.ls:0.5.0:uber') {
transitive = false
}
lsp ('com.redhat.microprofile:com.redhat.quarkus.ls:0.12.1') {
transitive = false
}
compile 'com.redhat.microprofile:com.redhat.qute.ls:0.12.1'
lsp ('com.redhat.microprofile:com.redhat.qute.ls:0.12.1:uber') {
transitive = false
}
compile files(new File(buildDir, 'server')) {
builtBy 'copyDeps'
}
testCompile 'org.assertj:assertj-core:3.19.0'
}
task copyDeps(type: Copy) {
from configurations.lsp
into new File(buildDir, 'server/server')
rename '^(.*)(-[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?)(.*)$', '$1$4'
}
task downloadQuteProjectsZipFile(type: Download) {
src 'https://download.jboss.org/jbosstools/vscode/stable/builds/qute-jdt/2022-07-25_16-50-21-B140/all/repo/com.redhat.qute.jdt.test-0.12.1-projects.zip'
dest new File(buildDir, 'com.redhat.qute.jdt.test-projects.zip')
}
task downloadAndUnzipQuteProjects(dependsOn: downloadQuteProjectsZipFile, type: Copy) {
from zipTree(downloadQuteProjectsZipFile.dest)
into new File(projectDir, 'projects/qute')
}
task downloadQuarkusProjectsZipFile(type: Download) {
src 'https://download.jboss.org/jbosstools/vscode/stable/builds/quarkus-jdt/2022-07-25_16-50-21-B140/all/repo/com.redhat.microprofile.jdt.quarkus.test-0.12.1-projects.zip'
dest new File(buildDir, 'com.redhat.microprofile.jdt.quarkus.test-projects')
}
task downloadAndUnzipQuarkusProjects(dependsOn: downloadQuarkusProjectsZipFile, type: Copy) {
from zipTree(downloadQuarkusProjectsZipFile.dest)
into new File(projectDir, 'projects/quarkus')
}
runIde {
systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug'
systemProperties['com.redhat.devtools.intellij.quarkus.trace'] = 'true'
}
runIdeForUiTests {
systemProperty "robot-server.port", System.getProperty("robot-server.port")
}
prepareSandbox {
dependsOn copyDeps
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}
check.dependsOn jacocoTestReport
test.dependsOn downloadAndUnzipQuarkusProjects, downloadAndUnzipQuteProjects
group 'com.redhat.devtools.intellij'
version projectVersion // Plugin version