-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
136 lines (119 loc) · 3.9 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 {
ext.ideaVersion = ideaVersion
/*
* for more complex conversion ideaVersion -> sinceIdeaBuild
* see https://github.com/rhdunn/xquery-intellij-plugin/blob/master/build.gradle#L1-L47
*/
def since = ideaVersion =~ /IC-20(\d\d)\.([1-3])(\.\d+)?$/
if (since.matches()) {
ext.sinceIdeaBuild = "${since.group(1)}${since.group(2)}".toInteger()
}
if (ext.sinceIdeaBuild >= 223) {
ext.java_version = "17"
} else if (ext.sinceIdeaBuild >= 221) {
ext.java_version = "11"
} else {
ext.java_version = "11"
}
}
plugins {
id "org.jetbrains.intellij" version "${intellijPluginVersion}"
id "java"
id "jacoco"
id "idea"
}
sourceSets {
integrationTest {
java.srcDir file('src/it/java')
resources.srcDir file('src/it/resources')
compileClasspath += sourceSets.main.output + configurations.runtimeClasspath
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'
}
dependencies {
implementation(
"com.redhat.devtools.intellij:intellij-common:${intellijCommonVersion}",
'com.squareup.okhttp3:okhttp:3.12.12',
'org.eclipse.lsp4j:org.eclipse.lsp4j.jsonrpc:0.9.0',
'org.jboss.tools.rsp.api.bundles:org.jboss.tools.rsp.api:0.25.0.Final@jar',
"org.apache.commons:commons-lang3:3.12.0"
)
testImplementation(
"org.assertj:assertj-core:3.22.0",
"org.mockito:mockito-inline:4.5.1"
)
integrationTestImplementation(
"com.redhat.devtools.intellij:intellij-common:1.1.0",
"com.redhat.devtools.intellij:intellij-common-ui-test-library:0.2.0",
"org.junit.platform:junit-platform-launcher:1.9.3",
"com.google.code.gson:gson:2.8.9"
)
}
configurations {
implementation {
exclude group: 'org.slf4j', module: 'slf4j-api'
}
compileOptions {
sourceCompatibility = 17
targetCompatibility = 17
}
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
test {
afterSuite { desc, result ->
if (!desc.parent)
println("${result.resultType} " +
"(${result.testCount} tests, " +
"${result.successfulTestCount} successes, " +
"${result.failedTestCount} failures, " +
"${result.skippedTestCount} skipped)")
}
}
intellij {
version = ideaVersion //for a full list of Jetbrains IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
pluginName = 'Server Connector by Red Hat'
plugins = ['com.intellij.java', 'terminal', 'com.redhat.devtools.intellij.telemetry:1.1.0.52' ]
updateSinceUntilBuild = false
}
runIde {
systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug'
}
patchPluginXml {
sinceBuild = "${sinceIdeaBuild}"
}
runPluginVerifier {
ideVersions = [ideaVersion]
}
publishPlugin {
token = jetBrainsToken
channels = [jetBrainsChannel]
}
runIdeForUiTests {
systemProperty "robot-server.port", System.getProperty("robot-server.port")
systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug'
}
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://repository.jboss.org'
}
maven {
url 'https://packages.jetbrains.team/maven/p/ij/intellij-dependencies'
}
}
group 'com.redhat.devtools.intellij'
version projectVersion // Plugin version