-
-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathbuild.gradle
143 lines (119 loc) · 3.3 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
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.intellij.platform.gradle.extensions.IntelliJPlatformDependenciesExtension
plugins {
id 'org.jetbrains.intellij.platform' version "2.5.0"
}
apply plugin: 'org.jetbrains.intellij.platform'
subprojects {
apply plugin: 'org.jetbrains.intellij.platform.module'
}
allprojects {
repositories { mavenCentral() }
dependencies {
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.6.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.3'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.6.3'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.3'
testCompileOnly 'junit:junit:4.13.1'
}
apply plugin: 'java'
// Only apply the main Java version if this is not the JPS module
// JPS module defines its own Java compatibility version (11)
if (project.name != 'jps-plugin') {
sourceCompatibility = javaVersion
targetCompatibility = javaTargetVersion
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
sourceSets {
main {
java.srcDirs 'src', 'gen'
resources.srcDirs 'resources', 'plugin/resources'
}
test {
java.srcDir 'tests'
}
}
intellijPlatform {
version = "${version}.$buildNumber"
// plugins = ['copyright', 'java']
// downloadSources = Boolean.valueOf(sources)
// sameSinceUntilBuild = Boolean.valueOf(isEAP)
}
composedJar {
archiveVersion = ""
}
repositories {
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform { IntelliJPlatformDependenciesExtension ijp ->
// https://data.services.jetbrains.com/products?code=IC
ijp.intellijIdeaCommunity("251.23774.318")
ijp.bundledPlugins("com.intellij.copyright", "com.intellij.java")
ijp.instrumentationTools()
ijp.testFramework(TestFrameworkType.Platform.INSTANCE)
ijp.testFramework(TestFrameworkType.Plugin.Java.INSTANCE)
}
}
def compilationPackages = ['org/intellij/erlang/build/**', 'org/intellij/erlang/jps/**']
tasks.withType(Test).configureEach {
jvmArgs = [
'-Djava.awt.headless=true'
]
}
test {
environment 'NO_FS_ROOTS_ACCESS_CHECK', 'true'
useJUnitPlatform {
exclude compilationPackages
}
testLogging {
exceptionFormat = 'full'
}
}
task testCompilation(type: Test, group: 'Verification', dependsOn: [classes, testClasses]) {
useJUnit {
include compilationPackages
}
testLogging {
exceptionFormat = 'full'
}
systemProperties = [
"erlang.sdk.path": System.getProperty("erlang.sdk.path")
]
}
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
implementation name: 'OtpErlang'
implementation project('jps-plugin')
}
// Add JPS Java 11 verification to the plugin build pipeline
afterEvaluate {
tasks.named('prepareSandbox') {
dependsOn ':jps-plugin:verifyJpsJava11Compatibility'
}
tasks.named('buildPlugin') {
dependsOn ':jps-plugin:verifyJpsJava11Compatibility'
}
tasks.named('check') {
dependsOn ':jps-plugin:verifyJpsJava11Compatibility'
}
}
apply plugin: 'idea'
idea {
project {
jdkName = javaVersion
languageLevel = javaVersion
}
module {
generatedSourceDirs += file('gen')
}
}