Skip to content

Commit

Permalink
cherry-pick of cypher25_apoc_proc_func_migration (#4211)
Browse files Browse the repository at this point in the history
* cherry-pick of cypher25_apoc_proc_func_migration

* restored stuff not needed for 5.24 release

* restored kotlin stuff
  • Loading branch information
vga91 authored Oct 29, 2024
1 parent 3ca3972 commit 33723d8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id 'maven-publish'
id 'antlr'
id "com.github.hierynomus.license-report" version"0.16.1"
id "org.jetbrains.kotlin.jvm" version "1.8.0" apply false
}

downloadLicenses {
Expand Down Expand Up @@ -58,7 +59,7 @@ subprojects {

task mySourcesJar(type: Jar) {
from sourceSets.main.allJava
classifier = 'sources'
archiveClassifier = 'sources'
}

task myJavadocJar(type: Jar) {
Expand Down Expand Up @@ -134,6 +135,6 @@ ext {
neo4jVersion = "5.24.1"
// instead we apply the override logic here
neo4jVersionEffective = project.hasProperty("neo4jVersionOverride") ? project.getProperty("neo4jVersionOverride") : neo4jVersion
testContainersVersion = '1.19.1'
testContainersVersion = '1.20.2'
apacheArrowVersion = '15.0.0'
}
10 changes: 5 additions & 5 deletions extended-it/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'com.github.johnrengelman.shadow'
id 'maven-publish'
id 'antlr'
id "org.jetbrains.kotlin.jvm" version "1.6.0"
id "org.jetbrains.kotlin.jvm" version "1.8.0"
id "com.diffplug.spotless" version "6.7.2"
}

Expand Down Expand Up @@ -51,10 +51,10 @@ dependencies {
}
testImplementation group: 'org.apache.parquet', name: 'parquet-hadoop', version: '1.13.1', withoutServers

testImplementation group: 'org.testcontainers', name: 'qdrant', version: '1.19.7'
testImplementation group: 'org.testcontainers', name: 'chromadb', version: '1.19.7'
testImplementation group: 'org.testcontainers', name: 'weaviate', version: '1.19.7'
testImplementation group: 'org.testcontainers', name: 'milvus', version: '1.19.7'
testImplementation group: 'org.testcontainers', name: 'qdrant', version: '1.20.2'
testImplementation group: 'org.testcontainers', name: 'chromadb', version: '1.20.2'
testImplementation group: 'org.testcontainers', name: 'weaviate', version: '1.20.2'
testImplementation group: 'org.testcontainers', name: 'milvus', version: '1.20.2'

configurations.all {
exclude group: 'org.slf4j', module: 'slf4j-nop'
Expand Down
18 changes: 12 additions & 6 deletions extended/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import org.gradle.api.internal.artifacts.DefaultExcludeRule

plugins {
id 'java'
id 'com.github.johnrengelman.shadow'
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'maven-publish'
id 'antlr'
id "org.jetbrains.kotlin.jvm" version "1.6.0"
id "com.diffplug.spotless" version "6.7.2"
id "org.jetbrains.kotlin.jvm" version "1.8.0"
id "com.diffplug.spotless" version "6.22.0"
}

spotless {
Expand All @@ -26,13 +26,19 @@ jar {
}

compileKotlin {
dependsOn(generateGrammarSource)
kotlinOptions.jvmTarget = "17"
}

generateGrammarSource {
arguments += ["-package", "apoc.custom"]
}

sourceSets.configureEach {
var generateGrammarSource = tasks.named(getTaskName("generate", "GrammarSource"))
java.srcDir(generateGrammarSource.map { files() })
}

javadoc {
failOnError = false
options.addStringOption('Xdoclint:none', '-quiet')
Expand All @@ -58,7 +64,7 @@ dependencies {
apt project(':processor')
apt group: 'org.neo4j', name: 'neo4j', version: neo4jVersionEffective // mandatory to run @ServiceProvider based META-INF code generation

antlr "org.antlr:antlr4:4.13.1", {
antlr "org.antlr:antlr4:4.13.2", {
exclude group: 'org.glassfish'
exclude group: 'com.ibm.icu'
exclude group: 'org.abego.treelayout'
Expand Down Expand Up @@ -111,7 +117,7 @@ dependencies {
compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
compileOnly group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.353' , withoutJacksons
compileOnly group: 'com.sun.mail', name: 'javax.mail', version: '1.6.0'
compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: '1.6.0'
compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: '1.8.0'

compileOnly group: 'org.apache.parquet', name: 'parquet-hadoop', version: '1.13.1', withoutServers
// testImplementation analogous is not needed since is bundled via `test-utils` submodule
Expand All @@ -133,7 +139,7 @@ dependencies {
testImplementation group: 'com.github.stefanbirkner', name: 'system-rules', version: '1.19.0'
testImplementation group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.270'
testImplementation group: 'org.reflections', name: 'reflections', version: '0.9.12'
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: '1.6.0'
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: '1.8.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
testImplementation group: 'org.apache.derby', name: 'derby', version: '10.12.1.1'
testImplementation group: 'org.mock-server', name: 'mockserver-netty', version: '5.6.0'
Expand Down
2 changes: 1 addition & 1 deletion extended/src/test/kotlin/apoc/nlp/NodeMatcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data class NodeMatcher(private val labels: List<Label>, private val properties:
actual?.keys == expected?.keys && actual!!.all { entry -> expected?.containsKey(entry.key)!! && expected[entry.key] == entry.value }

fun nodeMatches(item: Node?, labels: List<String>?, properties: Map<String, Any>?): Boolean {
val labelsMatched = item?.labels!!.count() == labels?.size && item.labels!!.all { label -> labels?.contains(label.name()) }
val labelsMatched = item?.labels!!.count() == labels?.size && item.labels!!.all { label -> labels.contains(label.name()) }
val propertiesMatches = propertiesMatch(properties, item.allProperties)
return labelsMatched && propertiesMatches
}
Expand Down
2 changes: 1 addition & 1 deletion extra-dependencies/nlp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jar {
dependencies {
implementation group: 'com.amazonaws', name: 'aws-java-sdk-comprehend', version: '1.12.353' , commonExclusions
implementation group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin', version: '2.14.0', commonExclusions
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0'
}


Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 33723d8

Please sign in to comment.