-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
80 lines (71 loc) · 2.26 KB
/
build.gradle
File metadata and controls
80 lines (71 loc) · 2.26 KB
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
plugins {
id 'java'
id 'org.jetbrains.intellij.platform' version '2.13.0'
}
// Repositories for resolving dependencies, including the IntelliJ Platform artifacts
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
// IntelliJ Platform and test framework dependencies used to build and run the plugin
dependencies {
intellijPlatform {
intellijIdea('2025.3.4')
bundledPlugin('com.intellij.java')
}
testImplementation platform('org.junit:junit-bom:5.11.4')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testRuntimeOnly 'junit:junit:4.13.2'
testImplementation 'org.assertj:assertj-core:3.27.7'
testImplementation 'org.mockito:mockito-core:5.14.2'
testImplementation 'org.mockito:mockito-junit-jupiter:5.14.2'
}
// Configure Java toolchain compatibility for compiling plugin sources
tasks.withType(JavaCompile).configureEach {
sourceCompatibility = '21'
targetCompatibility = '21'
}
// Use JUnit 5 platform for test execution; open jdk.jdi module for Mockito
tasks.named('test') {
useJUnitPlatform()
jvmArgs += ['--add-opens', 'jdk.jdi/com.sun.jdi=ALL-UNNAMED']
}
// Enable DEBUG logging for the plugin in the sandbox IDE
tasks.named('runIde') {
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
@Override
Iterable<String> asArguments() {
return ["-Didea.log.debug.categories=#com.akulik.lorrytori"]
}
})
}
// Download Javadoc and sources for all resolvable dependencies
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
// Disable buildSearchableOptions and instrumentCode — plugin has no Settings page;
// Microsoft JDK lacks the Packages directory that the instrumenter expects
intellijPlatform {
instrumentCode = false
buildSearchableOptions = false
pluginConfiguration.with {
name = 'lorry-tori'
version = '1.0.0'
ideaVersion.with {
sinceBuild = '253'
untilBuild = '253.*'
}
}
// Plugin verification — verify against the recommended IDE version
pluginVerification.with {
ides.with {
recommended()
}
}
}