-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.gradle
176 lines (150 loc) · 5.78 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
plugins {
id("java-library")
id("com.github.johnrengelman.shadow") version "7.1.0" apply false
id("maven-publish")
id("com.github.hierynomus.license-report") version "0.16.1"
id("com.diffplug.spotless") version "6.22.0"
}
downloadLicenses {
excludeDependencies = [
'org.neo4j.*'
]
}
allprojects {
group = 'org.neo4j.procedure'
version = System.getenv('APOC_VERSION') ? System.getenv('APOC_VERSION') : '2024.12.0'
archivesBaseName = 'apoc'
description = """neo4j-apoc-procedures"""
}
apply plugin: 'java-library'
if (System.env.CI != null)
apply from: 'teamcity-repository.gradle'
repositories {
/*maven { // this contains the neo4j 4.0.0-beta jars
url "https://neo4j.bintray.com/community/"
}*/
if (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "") {
maven {
url System.getenv('CODEARTIFACT_DOWNLOAD_URL')
credentials {
username System.getenv('CODEARTIFACT_USERNAME')
password System.getenv('CODEARTIFACT_TOKEN')
}
}
} else {
mavenCentral()
}
maven {
url "https://repo.gradle.org/gradle/libs-releases"
}
mavenLocal()
}
subprojects {
apply plugin: "com.diffplug.spotless"
apply plugin: 'java-library'
spotless {
java {
target 'src/*/java/**/*.java'
removeUnusedImports()
palantirJavaFormat('2.50.0')
}
}
repositories {
/*maven { // this contains the neo4j 4.0.0-beta jars
url "https://neo4j.bintray.com/community/"
}*/
if (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "") {
maven {
url System.getenv('CODEARTIFACT_DOWNLOAD_URL')
credentials {
username System.getenv('CODEARTIFACT_USERNAME')
password System.getenv('CODEARTIFACT_TOKEN')
}
}
} else {
mavenCentral()
}
maven {
url "https://repo.gradle.org/gradle/libs-releases"
}
mavenLocal()
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.register('mySourcesJar', Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
tasks.register('myJavadocJar', Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
test {
//exclude '**/CypherProceduresClusterTest.class'//, '**/AtomicTest.class'
// neo4jDockerImage system property is used in TestContainerUtil
systemProperties 'user.language': 'en',
'user.country': 'US',
'neo4jDockerImage': project.hasProperty("neo4jDockerEeOverride") ? project.getProperty("neo4jDockerEeOverride") : 'neo4j:2024.12.0-enterprise-debian',
'neo4jCommunityDockerImage': project.hasProperty("neo4jDockerCeOverride") ? project.getProperty("neo4jDockerCeOverride") : 'neo4j:2024.12.0-debian',
'coreDir': 'core',
'testDockerBundle': project.hasProperty("testDockerBundle"),
'org.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer.CHECK_REPORTED_COUNTERS': 'true' // Extra assertions in kernel
maxHeapSize = "5G"
forkEvery = 50
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
minHeapSize = "128m"
// This would apply only to TeamCity
// We need to ignore the failures because we may have tests muted
if (System.env.TEAMCITY_VERSION != null) {
ignoreFailures(true)
if (project.hasProperty('excludeSeleniumTests')) {
exclude '**/LoadHtmlTest*'
exclude '**/LoadHtmlTestParameterized*'
}
}
jvmArgs = ["--add-opens", "java.base/java.lang=ALL-UNNAMED",
"--add-opens", "java.base/java.nio=ALL-UNNAMED",
"--add-opens", "java.base/java.io=ALL-UNNAMED",
"--add-opens", "java.base/java.util=ALL-UNNAMED",
"--add-opens", "java.base/java.util.concurrent=ALL-UNNAMED",
"--add-opens", "java.base/sun.net.www.protocol.http=ALL-UNNAMED",
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.tools.javac=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.source.doctree=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.source.tree=ALL-UNNAMED",
"--add-opens", "jdk.compiler/com.sun.source.util=ALL-UNNAMED"]
filter {
setFailOnNoMatchingTests(false)
}
testLogging.showStandardStreams = true
}
configurations {
apt
}
configurations.configureEach {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'io.netty' && !details.requested.name.contains('netty-tcnative') && details.requested.name != 'netty') {
details.useVersion '4.1.101.Final' // Use same Netty version as server
}
}
}
compileJava {
options.annotationProcessorPath = configurations.apt
options.compilerArgs += ["-AIgnoreContextWarnings"]
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
}
apply from: "licenses-3rdparties.gradle"
apply from: "licenses-source-header.gradle"
ext {
publicDir = "${project.rootDir}"
neo4jVersionEffective = project.hasProperty("neo4jVersionOverride") ? project.getProperty("neo4jVersionOverride") : "2024.12.0"
testContainersVersion = '1.20.2'
apacheArrowVersion = '15.0.0'
}